Part Number Hot Search : 
B3013RW B3013RW DM162 URF1660 K11041 U143M S0400 ZL60012
Product Description
Full Text Search
 

To Download MC68HC908LK60 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  order this document by mc68hc08lk60/d rev. 1.0 non-disclosure agreement required 68hc08lk60 68hc908lk60 advance information this document contains information on a new product. specifications and information herein are subject to change without notice. hc08 hc08 hc08 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required advance information advance information mc68hc(9)08lk60 rev. 1.0 2 motorola motorola reserves the right to make changes without further notice to any products herein to improve reliability, function or design. motorola does not assume any liability arising out of the application or use of any product or circuit described herein; neither does it convey any license under its patent rights nor the rights of others. motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the motorola product could create a situation where personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized application, buyer shall indemnify and hold motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that motorola was negligent regarding the design or manufacture of the part. ? motorola, inc., 2000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola list of sections 3 non-disclosure agreement required advance information mc68hc(9)08lk60 list of sections section 1. general description . . . . . . . . . . . . . . . . . . . . 25 section 2. memory map . . . . . . . . . . . . . . . . . . . . . . . . . . 35 section 3. random-access memory (ram) . . . . . . . . . . 49 section 4. flash memory . . . . . . . . . . . . . . . . . . . . . . . . 51 section 5. central processor unit (cpu) . . . . . . . . . . . . 65 section 6. system integration module (sim) . . . . . . . . . 83 section 7. clock generator module (cgmb) . . . . . . . . 107 section 8. functional controller module (fcm) . . . . . . 139 section 9. break module. . . . . . . . . . . . . . . . . . . . . . . . . 157 section 10. power-on reset module (por) . . . . . . . . . 163 section 11. external interrupt module (irq) . . . . . . . . . 165 section 12. infrared serial communications interface (irsci) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 section 13. serial peripheral interface module (spi) . . 215 section 14. alert output generator (alr) . . . . . . . . . . 247 section 15. liquid crystal display module (lcd) . . . . 253 section 16. timer interface module (tim) . . . . . . . . . . . 265 section 17. input/output (i/o) ports . . . . . . . . . . . . . . . 293 section 18. monitor rom (mon) . . . . . . . . . . . . . . . . . . 305 section 19. keyboard interrupt (kbi) module. . . . . . . . 315 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required list of sections advance information mc68hc(9)08lk60 rev. 1.0 4 list of sections motorola section 20. preliminary electrical specifications . . . . 321 section 21. mechanical data . . . . . . . . . . . . . . . . . . . . . 335 section 22. ordering information . . . . . . . . . . . . . . . . . 351 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola table of contents 5 non-disclosure agreement required advance information mc68hc(9)08lk60 table of contents section 1. general description 1.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 1.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 1.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 1.4 mcu block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27 1.4.1 power supply pins (v dd , v ss , ev dd , and ev ss ) . . . . . . . .29 1.4.2 oscillator pins (osc1 and osc2) . . . . . . . . . . . . . . . . . . .30 1.4.3 external reset pin ( rst) . . . . . . . . . . . . . . . . . . . . . . . . . .30 1.4.4 external interrupt pin ( irq1). . . . . . . . . . . . . . . . . . . . . . . .31 1.4.5 external interrupt pin ( irq2). . . . . . . . . . . . . . . . . . . . . . . .31 1.4.6 analog ground pin (v ssa ) . . . . . . . . . . . . . . . . . . . . . . . . .31 1.4.7 analog power supply pin (v dda ) . . . . . . . . . . . . . . . . . . . .31 1.4.8 external filter capacitor pin (cgmxfc). . . . . . . . . . . . . . .31 1.4.9 port a i/o pins (pta7?ta0) . . . . . . . . . . . . . . . . . . . . . . .31 1.4.10 port b i/o pins (ptb7?tb0) . . . . . . . . . . . . . . . . . . . . . . .32 1.4.11 port c i/o pins (ptc7?tc0). . . . . . . . . . . . . . . . . . . . . . .32 1.4.12 spi master in/slave out (miso) . . . . . . . . . . . . . . . . . . . . .32 1.4.13 spi master out/slave in (mosi) . . . . . . . . . . . . . . . . . . . . .32 1.4.14 spi serial clock (spsck). . . . . . . . . . . . . . . . . . . . . . . . . .32 1.4.15 spi slave select ( ss) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 1.4.16 sci receive data (rxd) . . . . . . . . . . . . . . . . . . . . . . . . . . .33 1.4.17 sci transmit data (txd). . . . . . . . . . . . . . . . . . . . . . . . . . .33 1.4.18 alert generator output (alert) . . . . . . . . . . . . . . . . . . . . .33 1.4.19 power supply pins (v ll , v ll32 , v ll12 , and v cp4 ? cp1 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 1.4.20 frontplane and backplane drivers (fp84?p0, bp7?p0) . . . . . . . . . . . . . . . . . . . . . . . . .33 1.5 pin assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required table of contents advance information mc68hc(9)08lk60 rev. 1.0 6 table of contents motorola section 2. memory map 2.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 2.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 2.3 i/o section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 2.4 random-access memory (ram) . . . . . . . . . . . . . . . . . . . . . . .36 2.5 memory map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 2.6 monitor read-only memory (rom) . . . . . . . . . . . . . . . . . . . . .48 section 3. random-access memory (ram) 3.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 3.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 3.3 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 section 4. flash memory 4.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 4.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 4.3 flash1 functional description . . . . . . . . . . . . . . . . . . . . . . . .52 4.4 flash2 functional description . . . . . . . . . . . . . . . . . . . . . . . .53 4.5 flash1 control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 4.6 flash2 control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 4.7 flash1 block protect register . . . . . . . . . . . . . . . . . . . . . . . .58 4.8 flash2 block protect register . . . . . . . . . . . . . . . . . . . . . . . .59 4.9 block protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 4.10 charge pump frequency control . . . . . . . . . . . . . . . . . . . . . . .61 4.11 flash erase operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61 4.12 flash program and margin read operation . . . . . . . . . . . . .62 section 5. central processor unit (cpu) 5.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 5.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 5.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
table of contents mc68hc(9)08lk60 rev. 1.0 advance information motorola table of contents 7 non-disclosure agreement required 5.4 cpu registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 5.4.1 accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 5.4.2 index register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 5.4.3 stack pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69 5.4.4 program counter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70 5.4.5 condition code register . . . . . . . . . . . . . . . . . . . . . . . . . . .71 5.5 arithmetic/logic unit (alu) . . . . . . . . . . . . . . . . . . . . . . . . . . .73 5.6 cpu during break interrupts . . . . . . . . . . . . . . . . . . . . . . . . . .73 5.7 instruction set summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74 5.8 opcode map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80 section 6. system integration module (sim) 6.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83 6.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84 6.3 sim bus clock control and generation . . . . . . . . . . . . . . . . . .87 6.3.1 bus timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 6.3.2 clock startup from por or lvi reset. . . . . . . . . . . . . . . . .87 6.3.3 clocks in stop mode and wait mode . . . . . . . . . . . . . . . . .88 6.4 reset and system initialization. . . . . . . . . . . . . . . . . . . . . . . . .88 6.4.1 external pin reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 6.4.2 active resets from internal sources . . . . . . . . . . . . . . . . . .90 6.4.2.1 power-on reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91 6.4.2.2 computer operating properly (cop) reset. . . . . . . . . . .92 6.4.2.3 illegal opcode reset . . . . . . . . . . . . . . . . . . . . . . . . . . . .92 6.4.2.4 illegal address reset . . . . . . . . . . . . . . . . . . . . . . . . . . . .93 6.4.2.5 low-voltage inhibit (lvi) reset . . . . . . . . . . . . . . . . . . . .93 6.5 sim counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93 6.5.1 sim counter during power-on reset . . . . . . . . . . . . . . . . .93 6.5.2 sim counter during stop mode recovery . . . . . . . . . . . . .94 6.5.3 sim counter and reset states . . . . . . . . . . . . . . . . . . . . . .94 6.6 exception control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94 6.6.1 interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 6.6.1.1 hardware interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97 6.6.1.2 swi instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 6.6.2 reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required table of contents advance information mc68hc(9)08lk60 rev. 1.0 8 table of contents motorola 6.6.3 break interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 6.6.4 status flag protection in break mode. . . . . . . . . . . . . . . . .99 6.7 low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100 6.7.1 wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100 6.7.2 stop mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101 6.8 sim registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103 6.8.1 sim break status register . . . . . . . . . . . . . . . . . . . . . . . .103 6.8.2 sim reset status register . . . . . . . . . . . . . . . . . . . . . . . .105 6.8.3 sim break flag control register . . . . . . . . . . . . . . . . . . .106 section 7. clock generator module (cgmb) 7.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 7.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108 7.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109 7.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109 7.4.1 crystal oscillator circuit . . . . . . . . . . . . . . . . . . . . . . . . . .111 7.4.2 phase-locked loop circuit (pll) . . . . . . . . . . . . . . . . . . .111 7.4.2.1 pll circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 7.4.2.2 acquisition and tracking modes . . . . . . . . . . . . . . . . . .113 7.4.2.3 manual and automatic pll bandwidth modes . . . . . . .113 7.4.2.4 programming the pll . . . . . . . . . . . . . . . . . . . . . . . . . .115 7.4.2.5 special programming exceptions . . . . . . . . . . . . . . . . .118 7.4.3 base clock selector circuit. . . . . . . . . . . . . . . . . . . . . . . .118 7.4.4 cgmb external connections . . . . . . . . . . . . . . . . . . . . . .119 7.5 i/o signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 7.5.1 crystal amplifier input pin (osc1) . . . . . . . . . . . . . . . . . .120 7.5.2 crystal amplifier output pin (osc2) . . . . . . . . . . . . . . . . .120 7.5.3 external filter capacitor pin (cgmxfc). . . . . . . . . . . . . .120 7.5.4 pll analog power pin (v dda ) . . . . . . . . . . . . . . . . . . . . . .121 7.5.5 pll analog ground pin (v ssa ) . . . . . . . . . . . . . . . . . . . . .121 7.5.6 oscillator enable signal (simoscen) . . . . . . . . . . . . . . .121 7.5.7 crystal output frequency signal (cgmxclk) . . . . . . . . .121 7.5.8 cgmb base clock output (cgmout) . . . . . . . . . . . . . . .122 7.5.9 cgmb cpu interrupt (cgmint) . . . . . . . . . . . . . . . . . . . .122 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
table of contents mc68hc(9)08lk60 rev. 1.0 advance information motorola table of contents 9 non-disclosure agreement required 7.6 cgmb registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122 7.6.1 pll control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124 7.6.2 pll bandwidth control register . . . . . . . . . . . . . . . . . . .126 7.6.3 pll multiplier select register high. . . . . . . . . . . . . . . . . .128 7.6.4 pll multiplier select register low . . . . . . . . . . . . . . . . . .129 7.6.5 pll vco range select register . . . . . . . . . . . . . . . . . . .130 7.6.6 pll reference divider select register. . . . . . . . . . . . . . .131 7.7 interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132 7.8 wait mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132 7.9 cgmb during break interrupts. . . . . . . . . . . . . . . . . . . . . . . .133 7.10 acquisition/lock time specifications . . . . . . . . . . . . . . . . . . .133 7.10.1 acquisition/lock time definitions . . . . . . . . . . . . . . . . . . .133 7.10.2 parametric influences on reaction time . . . . . . . . . . . . .135 7.10.3 choosing a filter capacitor. . . . . . . . . . . . . . . . . . . . . . . .136 7.10.4 reaction time calculation . . . . . . . . . . . . . . . . . . . . . . . .137 section 8. functional controller module (fcm) 8.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139 8.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140 8.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140 8.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140 8.5 module description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 8.5.1 timebase submodule . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 8.5.2 real-time clock submodule. . . . . . . . . . . . . . . . . . . . . . .143 8.5.3 cop watchdog timer submodule . . . . . . . . . . . . . . . . . .144 8.6 interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 8.7 i/o signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 8.8 interrupt signals (fcm, cpu, and irq) . . . . . . . . . . . . . . . . .145 8.9 functional controller registers . . . . . . . . . . . . . . . . . . . . . . .146 8.9.1 timebase control register . . . . . . . . . . . . . . . . . . . . . . . .147 8.9.2 rtc control register . . . . . . . . . . . . . . . . . . . . . . . . . . . .150 8.9.3 rtc status register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152 8.9.4 chronograph data register . . . . . . . . . . . . . . . . . . . . . . .154 8.9.5 seconds data register . . . . . . . . . . . . . . . . . . . . . . . . . . .154 8.9.6 minutes data register. . . . . . . . . . . . . . . . . . . . . . . . . . . .155 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required table of contents advance information mc68hc(9)08lk60 rev. 1.0 10 table of contents motorola 8.9.7 hours data register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155 8.9.8 alarm minutes register . . . . . . . . . . . . . . . . . . . . . . . . . . .156 8.9.9 alarm hours register . . . . . . . . . . . . . . . . . . . . . . . . . . . .156 section 9. break module 9.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157 9.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157 9.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158 9.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158 9.4.1 flag protection during break interrupts . . . . . . . . . . . . . .160 9.4.2 cpu during break interrupts. . . . . . . . . . . . . . . . . . . . . . .160 9.4.3 tim during break interrupts . . . . . . . . . . . . . . . . . . . . . . .160 9.4.4 cop during break interrupts . . . . . . . . . . . . . . . . . . . . . .160 9.5 break module registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161 9.5.1 break status and control register . . . . . . . . . . . . . . . . . .161 9.5.2 break address registers . . . . . . . . . . . . . . . . . . . . . . . . .162 9.6 low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 9.6.1 wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 9.6.2 stop mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 section 10. power-on reset module (por) 10.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163 10.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163 10.3 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163 section 11. external interrupt module (irq) 11.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165 11.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165 11.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165 11.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166 11.4.1 irq1 pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170 11.4.2 irq2 pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171 11.5 irq module during break interrupts . . . . . . . . . . . . . . . . . . .172 11.6 irq status and control register . . . . . . . . . . . . . . . . . . . . . .172 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
table of contents mc68hc(9)08lk60 rev. 1.0 advance information motorola table of contents 11 non-disclosure agreement required section 12. infrared serial communications interface (irsci) 12.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175 12.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176 12.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176 12.4 irsci module overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177 12.5 infrared functional description. . . . . . . . . . . . . . . . . . . . . . . .178 12.5.1 infrared transmit encoder. . . . . . . . . . . . . . . . . . . . . . . . .179 12.5.2 infrared receive decoder . . . . . . . . . . . . . . . . . . . . . . . . .180 12.6 sci functional description . . . . . . . . . . . . . . . . . . . . . . . . . . .180 12.6.1 data format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 12.6.2 transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 12.6.2.1 character length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 12.6.2.2 character transmission . . . . . . . . . . . . . . . . . . . . . . . . .184 12.6.2.3 break characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 12.6.2.4 idle characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186 12.6.2.5 transmitter interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . .187 12.6.3 receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 12.6.3.1 character length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 12.6.3.2 character reception . . . . . . . . . . . . . . . . . . . . . . . . . . .187 12.6.3.3 data sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 12.6.3.4 framing errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191 12.6.3.5 baud rate tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . .191 12.6.3.6 receiver wakeup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194 12.6.3.7 receiver interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . .195 12.6.3.8 error interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .195 12.7 wait mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196 12.8 sci during break module interrupts. . . . . . . . . . . . . . . . . . . .196 12.9 i/o signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196 12.9.1 txd (transmit data) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197 12.9.2 rxd (receive data) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197 12.10 i/o registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198 12.10.1 sci control register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . .198 12.10.2 sci control register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . .201 12.10.3 sci control register 3 . . . . . . . . . . . . . . . . . . . . . . . . . . .204 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required table of contents advance information mc68hc(9)08lk60 rev. 1.0 12 table of contents motorola 12.10.4 sci status register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . .206 12.10.5 sci status register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 12.10.6 sci data register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211 12.10.7 sci baud rate register . . . . . . . . . . . . . . . . . . . . . . . . . .211 12.10.8 sci infrared control register . . . . . . . . . . . . . . . . . . . . . .213 section 13. serial peripheral interface module (spi) 13.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215 13.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216 13.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216 13.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217 13.4.1 master mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219 13.5 slave mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220 13.6 transmission formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221 13.6.1 clock phase and polarity controls . . . . . . . . . . . . . . . . . .221 13.6.2 transmission format when cpha = 0 . . . . . . . . . . . . . . .222 13.6.3 transmission format when cpha = 1 . . . . . . . . . . . . . . .224 13.6.4 transmission initiation latency . . . . . . . . . . . . . . . . . . . . .225 13.7 queuing transmission data . . . . . . . . . . . . . . . . . . . . . . . . . .227 13.8 error conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228 13.8.1 overflow error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228 13.8.2 mode fault error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231 13.9 interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233 13.10 resetting the spi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235 13.11 wait mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236 13.12 spi during break interrupts . . . . . . . . . . . . . . . . . . . . . . . . . .236 13.13 i/o signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237 13.13.1 master in/slave out (miso) . . . . . . . . . . . . . . . . . . . . . . .237 13.13.2 master out/slave in (mosi) . . . . . . . . . . . . . . . . . . . . . . .238 13.13.3 serial clock (spsck) . . . . . . . . . . . . . . . . . . . . . . . . . . . .238 13.13.4 slave select ( ss) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238 13.13.5 clock ground (ev ss ) . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
table of contents mc68hc(9)08lk60 rev. 1.0 advance information motorola table of contents 13 non-disclosure agreement required 13.14 i/o registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 13.14.1 spi control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 13.14.2 spi status and control register . . . . . . . . . . . . . . . . . . .243 13.14.3 spi data register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246 section 14. alert output generator (alr) 14.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247 14.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247 14.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247 14.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247 14.4.1 alert control register . . . . . . . . . . . . . . . . . . . . . . . . . . . .249 14.4.2 sound pressure level circuit . . . . . . . . . . . . . . . . . . . . . .249 14.4.3 alert data register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250 section 15. liquid crystal display module (lcd) 15.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253 15.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253 15.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253 15.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254 15.5 lcd registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255 15.5.1 lcd control register . . . . . . . . . . . . . . . . . . . . . . . . . . . .255 15.5.2 lcd address register. . . . . . . . . . . . . . . . . . . . . . . . . . . .256 15.5.3 lcd data register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258 15.6 anti-ghosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .262 15.7 software examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263 15.8 power supply pins (v ll , v ll12 , v ll32 , and vcp1?cp4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .264 section 16. timer interface module (tim) 16.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265 16.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266 16.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required table of contents advance information mc68hc(9)08lk60 rev. 1.0 14 table of contents motorola 16.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 16.4.1 timer counter prescaler . . . . . . . . . . . . . . . . . . . . . . . . . .270 16.4.2 input capture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 16.4.3 output compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271 16.4.3.1 unbuffered output compare . . . . . . . . . . . . . . . . . . . . .271 16.4.3.2 buffered output compare . . . . . . . . . . . . . . . . . . . . . . .272 16.4.4 pulse-width modulation (pwm) . . . . . . . . . . . . . . . . . . . .273 16.4.4.1 unbuffered pwm signal generation . . . . . . . . . . . . . . .274 16.4.4.2 buffered pwm signal generation . . . . . . . . . . . . . . . . .275 16.4.4.3 pwm initialization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .276 16.5 interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277 16.6 low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278 16.6.1 wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278 16.6.2 stop mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278 16.7 tim during break interrupts . . . . . . . . . . . . . . . . . . . . . . . . . .278 16.8 i/o signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279 16.8.1 tim clock pin (tclk) . . . . . . . . . . . . . . . . . . . . . . . . . . . .279 16.8.2 timer channel i/o pins (tch0?ch3). . . . . . . . . . . . . . .279 16.9 i/o registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280 16.9.1 timer status and control register . . . . . . . . . . . . . . . . . .280 16.9.2 timer counter registers . . . . . . . . . . . . . . . . . . . . . . . . .283 16.9.3 timer modulo registers . . . . . . . . . . . . . . . . . . . . . . . . . .284 16.9.4 timer channel status and control registers . . . . . . . . . .285 16.9.5 timer channel registers. . . . . . . . . . . . . . . . . . . . . . . . . .290 section 17. input/output (i/o) ports 17.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293 17.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293 17.3 port a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295 17.3.1 port a data register . . . . . . . . . . . . . . . . . . . . . . . . . . . .295 17.3.2 data direction register a . . . . . . . . . . . . . . . . . . . . . . . . .296 17.4 port b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298 17.4.1 port b data register . . . . . . . . . . . . . . . . . . . . . . . . . . . .298 17.4.2 data direction register b . . . . . . . . . . . . . . . . . . . . . . . . .299 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
table of contents mc68hc(9)08lk60 rev. 1.0 advance information motorola table of contents 15 non-disclosure agreement required 17.5 port c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301 17.5.1 port c data register . . . . . . . . . . . . . . . . . . . . . . . . . . . .301 17.5.2 data direction register c . . . . . . . . . . . . . . . . . . . . . . . . .302 section 18. monitor rom (mon) 18.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305 18.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305 18.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305 18.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .306 18.4.1 entering monitor mode . . . . . . . . . . . . . . . . . . . . . . . . . . .308 18.4.2 data format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .309 18.4.3 echoing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310 18.4.4 break signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310 18.4.5 baud rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .314 section 19. keyboard interrupt (kbi) module 19.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .315 19.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .315 19.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .315 19.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .317 19.5 initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318 19.6 wait mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .319 19.7 i/o registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .319 19.7.1 irq status and control register. . . . . . . . . . . . . . . . . . . .319 19.7.2 keyboard interrupt enable register . . . . . . . . . . . . . . . . .319 section 20. preliminary electrical specifications 20.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321 20.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321 20.3 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . .322 20.4 functional operating range. . . . . . . . . . . . . . . . . . . . . . . . . .323 20.5 thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323 20.6 3.0 volt 10% dc electrical characteristics . . . . . . . . . . . . .324 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required table of contents advance information mc68hc(9)08lk60 rev. 1.0 16 table of contents motorola 20.7 2.0 volt 10% dc electrical characteristics . . . . . . . . . . . . .325 20.8 3.0 volt 10% control timing . . . . . . . . . . . . . . . . . . . . . . . .326 20.9 2.0 volt 10% control timing . . . . . . . . . . . . . . . . . . . . . . . .326 20.10 3.0 volt 10% serial peripheral interface (spi) timing . . . . .327 20.11 2.0 volt 10% serial peripheral interface (spi) timing . . . . .328 20.12 pll2p12m electrical specifications . . . . . . . . . . . . . . . . . . . .331 20.13 bus clock pll acquisition/lock time specifications . . . . . . .332 20.14 pll2p12m component specifications . . . . . . . . . . . . . . . . . .333 20.15 ram characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334 20.16 flash memory electrical characteristics . . . . . . . . . . . . . . .334 section 21. mechanical data 21.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335 21.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335 21.3 160 input/output, bga, standard map, 15 x 15 package (case #1268) . . . . . . . . . . . . . . . . . . . . .336 21.4 wire bond information (mcw68hc08lk60) . . . . . . . . . . . . .337 21.4.1 die pad coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337 21.4.2 die layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .342 21.5 bump wafer information (mccf68hc08lk60) . . . . . . . . . . .343 21.5.1 bump specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343 21.5.2 bumped wafer pad coordinates. . . . . . . . . . . . . . . . . . . .344 21.5.3 die feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349 21.5.4 tape and reel die orientation . . . . . . . . . . . . . . . . . . . . .350 section 22. ordering information 22.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351 22.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351 22.3 mc order numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola list of figures 17 non-disclosure agreement required advance information mc68hc(9)08lk60 list of figures figure title page 1-1 mc68hc(9)08lk60 block diagram . . . . . . . . . . . . . . . . . . .28 1-2 power supply bypassing . . . . . . . . . . . . . . . . . . . . . . . . . . .29 1-3 crystal connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 1-4 160-pin bga pin assignments. . . . . . . . . . . . . . . . . . . . . . .34 2-1 memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38 2-2 control, status, and data registers. . . . . . . . . . . . . . . . . . .39 2-3 sim registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 2-4 vector addressesin flash/rom . . . . . . . . . . . . . . . . . . . .47 4-1 flash register summary . . . . . . . . . . . . . . . . . . . . . . . . . .52 4-2 flash1 control register (fl1cr) . . . . . . . . . . . . . . . . . . .54 4-3 flash2 control register (fl2cr) . . . . . . . . . . . . . . . . . . .56 4-4 flash1 block protect register (fl1bpr) . . . . . . . . . . . . .58 4-5 flash2 block protect register (fl2bpr) . . . . . . . . . . . . .59 4-6 page program algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . .64 5-1 cpu registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 5-2 accumulator (a) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 5-3 index register (h:x). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 5-4 stack pointer (sp) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69 5-5 program counter (pc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70 5-6 condition code register (ccr) . . . . . . . . . . . . . . . . . . . . . .71 6-1 sim block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85 6-2 sim i/o register summary . . . . . . . . . . . . . . . . . . . . . . . . .86 6-3 cgm clock signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 6-4 external reset timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 6-5 internal reset timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required list of figures advance information mc68hc(9)08lk60 rev. 1.0 18 list of figures motorola figure title page 6-6 sources of internal reset. . . . . . . . . . . . . . . . . . . . . . . . . . .90 6-7 por recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91 6-8 interrupt entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 6-9 interrupt processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96 6-10 interrupt recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97 6-11 interrupt recognition example . . . . . . . . . . . . . . . . . . . . . . .98 6-12 wait mode entry timing . . . . . . . . . . . . . . . . . . . . . . . . . . .100 6-13 wait recovery from interrupt or break . . . . . . . . . . . . . . . .101 6-14 wait recovery from internal reset . . . . . . . . . . . . . . . . . .101 6-15 stop mode entry timing. . . . . . . . . . . . . . . . . . . . . . . . . . .102 6-16 stop mode recovery from interrupt or break. . . . . . . . . . .102 6-17 sim break status register (sbsr) . . . . . . . . . . . . . . . . . .103 6-18 sim reset status register (srsr) . . . . . . . . . . . . . . . . . .105 6-19 sim break flag control register (sbfcr) . . . . . . . . . . . .106 7-1 cgmb block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . .110 7-2 cgmb external connections . . . . . . . . . . . . . . . . . . . . . . .120 7-3 cgmb i/o register summary . . . . . . . . . . . . . . . . . . . . . .123 7-4 pll control register (pctl) . . . . . . . . . . . . . . . . . . . . . . .124 7-5 pll bandwidth control register (pbwc) . . . . . . . . . . . . .127 7-6 pll multiplier select register high (pmsh) . . . . . . . . . . .128 7-7 pll multiplier select register low (pmsl) . . . . . . . . . . . .129 7-8 pll vco range select register (pvrs) . . . . . . . . . . . . .130 7-9 pll reference divider select register (prds) . . . . . . . .131 8-1 functional controller block diagram . . . . . . . . . . . . . . . . .141 8-2 real-time clock system block diagram . . . . . . . . . . . . . .142 8-3 summary of the functional controller registers . . . . . . . .146 8-4 timebase control register (tbcr) . . . . . . . . . . . . . . . . . .147 8-5 rtc control register (rtccr) . . . . . . . . . . . . . . . . . . . . .150 8-6 rtc status register (rtcsr). . . . . . . . . . . . . . . . . . . . . .152 8-7 chronograph data register (chrdr) . . . . . . . . . . . . . . . .154 8-8 seconds data register (secr) . . . . . . . . . . . . . . . . . . . . .154 8-9 minutes data register (minr) . . . . . . . . . . . . . . . . . . . . . .155 8-10 hours data register (horr) . . . . . . . . . . . . . . . . . . . . . . .155 8-11 alarm minutes register (alrmr) . . . . . . . . . . . . . . . . . . .156 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
list of figures mc68hc(9)08lk60 rev. 1.0 advance information motorola list of figures 19 non-disclosure agreement required figure title page 8-12 alarm hours register (alrhr) . . . . . . . . . . . . . . . . . . . . .156 9-1 break module block diagram . . . . . . . . . . . . . . . . . . . . . . .159 9-2 break i/o register summary . . . . . . . . . . . . . . . . . . . . . . .159 9-3 break status and control register (brkscr) . . . . . . . . .161 9-4 break address register high (brkh) . . . . . . . . . . . . . . . .162 9-5 break address register low (brkl) . . . . . . . . . . . . . . . . .162 10-1 por block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164 11-1 irq i/o register summary . . . . . . . . . . . . . . . . . . . . . . . .166 11-2 irq module block diagram . . . . . . . . . . . . . . . . . . . . . . . .167 11-3 irq interrupt flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . .169 11-4 irq status and control register (iscr) . . . . . . . . . . . . . .173 12-1 sci and ir system block diagram . . . . . . . . . . . . . . . . . .178 12-2 infrared submodule diagram . . . . . . . . . . . . . . . . . . . . . . .179 12-3 sci module block diagram . . . . . . . . . . . . . . . . . . . . . . . .181 12-4 irsci i/o register summary. . . . . . . . . . . . . . . . . . . . . . . .182 12-5 sci data formats (8-bit/9-bit for standard sci and infrared) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 12-6 sci transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 12-7 sci receiver block diagram . . . . . . . . . . . . . . . . . . . . . . .188 12-8 receiver data sampling. . . . . . . . . . . . . . . . . . . . . . . . . . .189 12-9 slow data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 12-10 fast data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193 12-11 sci control register 1 (scc1) . . . . . . . . . . . . . . . . . . . . .199 12-12 sci control register 2 (scc2) . . . . . . . . . . . . . . . . . . . . .201 12-13 sci control register 3 (scc3) . . . . . . . . . . . . . . . . . . . . .204 12-14 sci status register 1 (scs1) . . . . . . . . . . . . . . . . . . . . . .206 12-15 flag clearing sequence. . . . . . . . . . . . . . . . . . . . . . . . . . .209 12-16 sci status register 2 (scs2) . . . . . . . . . . . . . . . . . . . . . .210 12-17 sci data register (scdr) . . . . . . . . . . . . . . . . . . . . . . . . .211 12-18 sci baud rate register (scbr) . . . . . . . . . . . . . . . . . . . .211 12-19 sci infrared control register (scircr) . . . . . . . . . . . . . .213 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required list of figures advance information mc68hc(9)08lk60 rev. 1.0 20 list of figures motorola figure title page 13-1 spi i/o register summary . . . . . . . . . . . . . . . . . . . . . . . . .217 13-2 spi module block diagram . . . . . . . . . . . . . . . . . . . . . . . .218 13-3 full-duplex master-slave connections . . . . . . . . . . . . . . .220 13-4 transmission format (cpha = 0) . . . . . . . . . . . . . . . . . . .223 13-5 cpha/ ss timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223 13-6 transmission format (cpha = 1) . . . . . . . . . . . . . . . . . . .224 13-7 transmission start delay (master) . . . . . . . . . . . . . . . . . . .226 13-8 sprf/spte cpu interrupt timing. . . . . . . . . . . . . . . . . . .227 13-9 missed read of overflow condition . . . . . . . . . . . . . . . . . .229 13-10 clearing sprf when ovrf interrupt is not enabled . . . .230 13-11 spi interrupt request generation . . . . . . . . . . . . . . . . . . .234 13-12 cpha/ ss timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239 13-13 spi control register (spcr) . . . . . . . . . . . . . . . . . . . . . . .241 13-14 spi status and control register (spscr). . . . . . . . . . . . .243 13-15 spi data register (spdr) . . . . . . . . . . . . . . . . . . . . . . . . .246 14-1 alert control register (alcr) . . . . . . . . . . . . . . . . . . . . . .249 14-2 alert data register (aldr) . . . . . . . . . . . . . . . . . . . . . . . .250 14-3 block diagram of spl reduction circuit . . . . . . . . . . . . . .252 15-1 lcd driver block diagram . . . . . . . . . . . . . . . . . . . . . . . . .254 15-2 lcd control register (lcdcr) . . . . . . . . . . . . . . . . . . . . .255 15-3 lcd address register (lcdar) . . . . . . . . . . . . . . . . . . . .256 15-4 lcd data register (lcddr) . . . . . . . . . . . . . . . . . . . . . . .258 15-5 lcd backplane waveforms ?3 bp . . . . . . . . . . . . . . . . .259 15-6 lcd backplane waveforms ?5 bp . . . . . . . . . . . . . . . . .260 15-7 lcd backplane waveforms ?8 bp . . . . . . . . . . . . . . . . .261 15-8 lcd backplane waveforms with anti-ghosting ?3 bp . .262 15-9 lcd voltage converter connections . . . . . . . . . . . . . . . . .264 16-1 tim block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .267 16-2 tim i/o register summary . . . . . . . . . . . . . . . . . . . . . . . .268 16-3 pwm period and pulse width . . . . . . . . . . . . . . . . . . . . . .273 16-4 timer status and control register (tsc) . . . . . . . . . . . . .280 16-5 timer counter register high (tcnth) . . . . . . . . . . . . . . .283 16-6 timer counter register low (tcntl) . . . . . . . . . . . . . . . .283 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
list of figures mc68hc(9)08lk60 rev. 1.0 advance information motorola list of figures 21 non-disclosure agreement required figure title page 16-7 timer modulo register high (tmodh) . . . . . . . . . . . . . . .284 16-8 timer modulo register low (tmodl) . . . . . . . . . . . . . . . .284 16-9 timer channel 0 status and control register (tsc0) . . . .285 16-10 timer channel 1 status and control register (tsc1) . . . .285 16-11 timer channel 2 status and control register (tsc2) . . . .286 16-12 timer channel 3 status and control register (tsc3) . . . .286 16-13 chxmax latency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289 16-14 timer channel 0 register high (tch0h). . . . . . . . . . . . . .290 16-15 timer channel 0 register low (tch0l) . . . . . . . . . . . . . .290 16-16 timer channel 1 register high (tch1h). . . . . . . . . . . . . .291 16-17 timer channel 1 register low (tch1l) . . . . . . . . . . . . . .291 16-18 timer channel 2 register high (tch2h). . . . . . . . . . . . . .291 16-19 timer channel 2 register low (tch2l) . . . . . . . . . . . . . .291 16-20 timer channel 3 register high (tch3h). . . . . . . . . . . . . .292 16-21 timer channel 3 register low (tch3l) . . . . . . . . . . . . . .292 17-1 i/o port register summary . . . . . . . . . . . . . . . . . . . . . . . .294 17-2 port a data register (pta) . . . . . . . . . . . . . . . . . . . . . . . .295 17-3 data direction register a (ddra) . . . . . . . . . . . . . . . . . . .296 17-4 port a i/o circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296 17-5 port b data register (ptb) . . . . . . . . . . . . . . . . . . . . . . . .298 17-6 data direction register b (ddrb) . . . . . . . . . . . . . . . . . . .299 17-7 port b i/o circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299 17-8 port c data register (ptc) . . . . . . . . . . . . . . . . . . . . . . . .301 17-9 data direction register c (ddrc) . . . . . . . . . . . . . . . . . . .302 17-10 port c i/o circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .302 18-1 monitor mode circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307 18-2 monitor data format . . . . . . . . . . . . . . . . . . . . . . . . . . . . .309 18-3 sample monitor waveforms . . . . . . . . . . . . . . . . . . . . . . . .309 18-4 read transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310 18-5 break transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310 19-1 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .316 19-2 keyboard interrupt enable register (kbier) . . . . . . . . . . .319 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required list of figures advance information mc68hc(9)08lk60 rev. 1.0 22 list of figures motorola figure title page 20-1 spi master timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329 20-2 spi slave timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .330 21-1 68hc08lk60 die layout . . . . . . . . . . . . . . . . . . . . . . . . . .342 21-2 bump specification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343 21-3 bump die layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349 21-4 tape and reel die orientation. . . . . . . . . . . . . . . . . . . . . .350 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola list of tables 23 non-disclosure agreement required advance information mc68hc(9)08lk60 list of tables table title page 4-1 erase block sizes of flash1 ................................................55 4-2 erase block sizes of flash2 ................................................56 4-3 charge pump clock frequency .............................................61 5-1 instruction set summary .......................................................74 5-2 opcode map ...........................................................................81 6-1 signal name conventions .....................................................86 6-2 pin bit set timing ..................................................................89 6-3 sim registers ......................................................................103 7-1 numeric example of pll register programming.................117 7-2 pre1 and pre0 programming ............................................126 7-3 vpr1 and vpr0 programming ............................................126 8-1 watchdog timer timeout rates...........................................148 8-2 timebase crystal options ....................................................149 8-3 prq1 and prq0 rtc interrupt periods ..............................151 12-1 start bit verification ..............................................................190 12-2 data bit recovery.................................................................190 12-3 stop bit recovery.................................................................191 12-4 sci standard and infrared pin functions.............................197 12-5 character format selection..................................................200 12-6 sci baud rate selection......................................................212 12-7 sci baud rate selection examples .....................................212 13-1 spi interrupts........................................................................233 13-2 spi configuration .................................................................240 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required list of tables advance information mc68hc(9)08lk60 rev. 1.0 24 list of tables motorola table title page 13-3 spi master baud rate selection ..........................................245 14-1 audio alert tone generator divider ratios ..........................248 14-2 clock divider and modulator selections ..............................250 14-3 duty cycle selection ............................................................251 15-1 duty cycle select .................................................................255 15-2 frontplane address assignments.........................................257 16-1 prescaler selection...............................................................282 16-2 mode, edge, and level selection.........................................288 17-1 port a pin functions.............................................................297 17-2 port b pin functions.............................................................300 17-3 port c pin functions.............................................................303 18-1 mode selection ....................................................................308 18-2 mode differences .................................................................309 18-3 read (read memory) command ........................................311 18-4 write (write memory) command.......................................311 18-5 iread (indexed read) command .......................................312 18-6 iwrite (indexed write) command......................................312 18-7 readsp (read stack pointer) command...........................313 18-8 run (run user program) command...................................313 18-9 monitor baud rate selection................................................314 21-1 die pad coordinates ............................................................337 21-2 bump coordinates................................................................344 22-1 mc order numbers ..............................................................351 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola general description 25 non-disclosure agreement required advance information mc68hc(9)08lk60 section 1. general description 1.1 contents 1.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 1.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 1.4 mcu block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27 1.4.1 power supply pins (v dd , v ss , ev dd , and ev ss ) . . . . . . . .29 1.4.2 oscillator pins (osc1 and osc2) . . . . . . . . . . . . . . . . . . .30 1.4.3 external reset pin ( rst) . . . . . . . . . . . . . . . . . . . . . . . . . .30 1.4.4 external interrupt pin ( irq1). . . . . . . . . . . . . . . . . . . . . . . .31 1.4.5 external interrupt pin ( irq2). . . . . . . . . . . . . . . . . . . . . . . .31 1.4.6 analog ground pin (v ssa ) . . . . . . . . . . . . . . . . . . . . . . . . .31 1.4.7 analog power supply pin (v dda ) . . . . . . . . . . . . . . . . . . . .31 1.4.8 external filter capacitor pin (cgmxfc). . . . . . . . . . . . . . .31 1.4.9 port a i/o pins (pta7?ta0) . . . . . . . . . . . . . . . . . . . . . . .31 1.4.10 port b i/o pins (ptb7?tb0) . . . . . . . . . . . . . . . . . . . . . . .32 1.4.11 port c i/o pins (ptc7?tc0). . . . . . . . . . . . . . . . . . . . . . .32 1.4.12 spi master in/slave out (miso) . . . . . . . . . . . . . . . . . . . . .32 1.4.13 spi master out/slave in (mosi) . . . . . . . . . . . . . . . . . . . . .32 1.4.14 spi serial clock (spsck). . . . . . . . . . . . . . . . . . . . . . . . . .32 1.4.15 spi slave select ( ss) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 1.4.16 sci receive data (rxd) . . . . . . . . . . . . . . . . . . . . . . . . . . .33 1.4.17 sci transmit data (txd). . . . . . . . . . . . . . . . . . . . . . . . . . .33 1.4.18 alert generator output (alert) . . . . . . . . . . . . . . . . . . . . .33 1.4.19 power supply pins (v ll , v ll32 , v ll12 , and v cp4 ? cp1 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 1.4.20 frontplane and backplane drivers (fp84?p0, bp7?p0) . . . . . . . . . . . . . . . . . . . . . . . . .33 1.5 pin assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required general description advance information mc68hc(9)08lk60 rev. 1.0 26 general description motorola 1.2 introduction the mc68hc(9)08lk60 is a member of the low-cost, low-power, high- performance m68hc08 family of 8-bit microcontroller units (mcus). the m68hc08 family is based on the customer-specified integrated circuit (csic) design strategy. all mcus in the family use the enhanced m68hc08 central processor unit (cpu08) and are available with a variety of modules, memory sizes and types, and package types. 1.3 features features of the mc68hc(9)08lk60 include: high-performance m68hc08 architecture fully upward-compatible object code with m6805, m146805, and m68hc05 families on-chip rom/flash of 60 kbytes 3.5 kbytes of on-chip mcu ram 24 general-purpose input/output (i/o) pins serial peripheral interface module (spi) infrared serial communications interface module (irsci) with software selectable irda modulation/demodulation clock generation module (cgmb) functional controller module (fcm) with real-time clock lcd module with 85 frontplanes and 8 backplanes alert generator module two external interrupt request (irq) pins 16-bit timer interface module (tim) system protection features: computer operating properly (cop) reset in fcm module illegal opcode detect with reset illegal address detect with reset f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
general description mcu block diagram mc68hc(9)08lk60 rev. 1.0 advance information motorola general description 27 non-disclosure agreement required 160-pin bga package or die low-power design, fully static with wait modes stop mode is disabled master reset pin and power-on reset features of the cpu08 include: enhanced hc05 programming model extensive loop control functions 16 addressing modes, 8 more than the hc05 16-bit index register and stack pointer fast 8 x 8 multiply instruction fast 16/8 divide instruction binary-coded decimal (bcd) instructions optimization for controller applications high-level language (c language) support note: there is no direct memory access module (dma) in mc68hc(9)08lk60. consequently, the user should disable all the dma functions in all modules. only three ports (ports a, b, and c) are available; ignore all other ports mentioned. no input capture or output compare pins are available for the timer module. 1.4 mcu block diagram figure 1-1 shows the structure of the mc68hc(9)08lk60. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required general description advance information mc68hc(9)08lk60 rev. 1.0 28 general description motorola figure 1-1. mc68hc(9)08lk60 block diagram ram ?3.5 kbytes control/status registers ?28 bytes 15 87 0 7 0 15 0 15 0 7 0 vc z n i h a h:x sp pc ccr cpu control arithmetic/ logic unit (alu) pta serial peripheral interface serial communications interface module with irda interface module 16-bit ptaddr pta0 pta1 pta2 pta3 pta4 pta5 pta6 pta7 osc1 data & address bus system clocks functional controller module power ptb ptbddr ptc ptcddr clock generation module monitor rom ?240 bytes user flash ?60,928 bytes user flash vector space ?48 bytes lcd module rst irq1 system integration module osc2 cgmxfc vll vll12 vll32 vcp1,2,3,4 irq2 ptb0 ptb1 ptb2 ptb3 ptb4 ptb5 ptb6 ptb7 ptc0 ptc1 ptc2 ptc3 ptc4 alert alert module bp 0? fp 0?4 spsck mosi miso ss rxd txd timer module (tim4) v dd v ssa v dda v ss ev dd ev ss 4 generator 2 2 ptc5 ptc6 ptc7 2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
general description mcu block diagram mc68hc(9)08lk60 rev. 1.0 advance information motorola general description 29 non-disclosure agreement required 1.4.1 power supply pins (v dd , v ss , ev dd , and ev ss ) the two v dd and two v ss pins are power supply and ground pins for the digital sections of the mcu. the mcu operates from a single-power supply ranging from 2 volts ( 10%) to 3 volts ( 10%). the ev dd and ev ss pins are power supply and ground pins for the i/o section of the mcu. very fast signal transitions on the mcu pins place high, short-duration current demands on the power supply. to prevent noise problems, take special care to provide good power supply bypassing at the mcu as shown in figure 1-2 . place the c1 bypass capacitor as close to the mcu as possible. use a high-frequency-response ceramic capacitor for c1. c2 is an optional bulk current bypass capacitor for use in applications that require the port pins to source high current levels. ev ss pin is also the ground return pin for the serial clock in the serial peripheral interface module (spi). it enables the user to implement a coplanar transmission line for the spi clock on printed circuit boards (pcbs) with no ground plane. ev ss can help reduce radiated radio frequency (rf) emissions by controlling trace impedance and minimizing radiating loop area. see section 13. serial peripheral interface module (spi) for more information. figure 1-2. power supply bypassing note: component values shown represent typical applications. mcu v dd c2 c1 0.1 f v ss v dd + f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required general description advance information mc68hc(9)08lk60 rev. 1.0 30 general description motorola 1.4.2 oscillator pins (osc1 and osc2) the osc1 and osc2 pins are the crystal connections for the on-chip oscillator. figure 1-3 shows a typical crystal oscillator circuit for a parallel resonant crystal. follow the crystal supplier? recommendations, as the crystal parameters determine the external component values required to provide reliable startup and maximum stability. the load capacitance values used in the oscillator circuit design should include all stray layout capacitances. to minimize output distortion and radio frequency (rf) emissions, mount the crystal and capacitors as close as possible to the pins. pay special attention to minimizing the length of the oscillator load capacitors?ground return path. figure 1-3. crystal connections note: component values shown represent typical applications. follow the crystal manufacturer? recommendations. 1.4.3 external reset pin ( rst) a logic 0 on the rst pin forces the mcu to a known startup state. rst is bidirectional, allowing a reset of the entire system. it is driven low when any internal reset source is asserted. see section 6. system integration module (sim) for more information. osc1 osc2 xtal 22 m ? mcu 27 pf 27 pf 38.4 khz 330 k ? f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
general description mcu block diagram mc68hc(9)08lk60 rev. 1.0 advance information motorola general description 31 non-disclosure agreement required 1.4.4 external interrupt pin ( irq1) irq1 is an asynchronous external interrupt pin. see section 6. system integration module (sim) and section 11. external interrupt module (irq) for more information. 1.4.5 external interrupt pin ( irq2) irq2 is an asynchronous external interrupt pin. see see section 6. system integration module (sim) and section 11. external interrupt module (irq) for more information. 1.4.6 analog ground pin (v ssa ) the v ssa analog ground pin is used only for the ground connections for the analog sections of the clock generator module (cgm) and should be decoupled as per the v ss digital ground pin. see 7.2 introduction for more information. 1.4.7 analog power supply pin (v dda ) v dda is the power supply pin for the analog portion of the clock generator module (cgm). see 7.2 introduction for more information. 1.4.8 external filter capacitor pin (cgmxfc) cgmxfc is an external filter capacitor connection for the cgm. see 7.2 introduction for more information. 1.4.9 port a i/o pins (pta7 pta0) pta7?ta0 are general-purpose bidirectional i/o port pins. see section 17. input/output (i/o) ports for more information. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required general description advance information mc68hc(9)08lk60 rev. 1.0 32 general description motorola 1.4.10 port b i/o pins (ptb7?tb0) ptb7?bc0 are general-purpose bidirectional i/o port pins. see section 17. input/output (i/o) ports for more information. 1.4.11 port c i/o pins (ptc7?tc0) ptc7?tc0 are general-purpose bidirectional i/o port pins. see section 17. input/output (i/o) ports for more information. 1.4.12 spi master in/slave out (miso) miso is used in the spi to receive/transmit data in the spi module. see section 13. serial peripheral interface module (spi) for more information. 1.4.13 spi master out/slave in (mosi) mosi is used in the spi to receive/transmit data in the spi module. see section 13. serial peripheral interface module (spi) for more information. 1.4.14 spi serial clock (spsck) spsck is the serial clock of the spi that synchronizes data transmission between master and slave devices. see section 13. serial peripheral interface module (spi) for more information. 1.4.15 spi slave select ( ss) ss is the slave select of the spi that indicate that the slave is enabled to receive data when the pin is at logic 0. see section 13. serial peripheral interface module (spi) for more information. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
general description pin assignments mc68hc(9)08lk60 rev. 1.0 advance information motorola general description 33 non-disclosure agreement required 1.4.16 sci receive data (rxd) the rxd pin is serial data input to the sci receiver. see section 12. infrared serial communications interface (irsci) for more information. 1.4.17 sci transmit data (txd) the txd pin is the serial data output from the sci transmitter. see section 12. infrared serial communications interface (irsci) for more information. 1.4.18 alert generator output (alert) this is the output from the alert generator module. see section 14. alert output generator (alr) for more information. 1.4.19 power supply pins (v ll , v ll32 , v ll12 , and v cp4 ? cp1 ) these are power supply pins for the lcd (liquid crystal display) voltage converter. these pins should be connected in a certain configuration in order for the charge pump to work correctly. see section 15. liquid crystal display module (lcd) for detailed hookup configuration. 1.4.20 frontplane and backplane drivers (fp84?p0, bp7?p0) these are frontplane (fp84?p0) and backplane (bp7?p0) drivers for an lcd display. see section 15. liquid crystal display module (lcd) for more information. 1.5 pin assignments the mc68hc(9)08lk60 is available in a 160-pin bga package. the pin assignments for this package are shown in figure 1-4 . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required general description advance information mc68hc(9)08lk60 rev. 1.0 34 general description motorola figure 1-4. 160-pin bga pin assignments ev ss v ss bp7 bp4 fp83 fp80 fp77 fp73 fp71 fp67 fp65 fp62 fp59 fp56 ptc0 alert fp84 fp81 fp79 fp75 fp72 fp69 fp66 fp63 fp61 fp57 fp54 ptc3 ptc2 ev dd bp6 v dd fp78 fp74 fp70 fp60 fp58 fp55 fp52 fp51 ptc5 ptc4 ptc1 ptc7 bp5 fp82 fp76 fp68 fp64 fp53 fp50 fp48 ptb0 ptb2 ev ss ptb1 fp46 fp44 fp47 fp45 ptb4 ptb5 ptb6 ptb3 v cp4 fp49 fp43 v ll32 ptb6 pta2 ptb7 pta0 v cp2 v cp3 v cp1 v ll12 pta3 pta4 pta1 pta5 fp41 fp42 v ll pta6 irq2 miso irq1 fp39 fp31 fp38 fp40 ev ss sck pta7 fp33 fp35 fp36 mosi ss osc2 bp0 fp0 fp8 fp14 fp18 fp22 fp37 fp32 fp34 tdo rdi v dda osc1 fp2 fp6 fp12 fp16 fp24 fp25 fp29 fp30 rst ev dd v ssa v ss bp2 fp1 fp4 fp7 fp10 fp13 fp19 fp21 fp27 fp28 ev ss v dd bp1 bp3 fp3 fp5 fp9 fp11 fp15 fp17 fp20 fp23 fp26 cgm- xfc a b c d e f g h j k l m n p 1234567891011121314 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola memory map 35 non-disclosure agreement required advance information mc68hc(9)08lk60 section 2. memory map 2.1 contents 2.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 2.3 i/o section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 2.4 random-access memory (ram) . . . . . . . . . . . . . . . . . . . . . . .36 2.5 memory map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 2.6 monitor read-only memory (rom) . . . . . . . . . . . . . . . . . . . . .48 2.2 introduction the central processor unit (cpu08) can address 64 kbytes of memory space. the memory map, shown in figure 2-1 , includes: 60 kbytes of flash 3.5 kbytes of ram 48 bytes of user-defined vectors 240 bytes of monitor rom f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required memory map advance information mc68hc(9)08lk60 rev. 1.0 36 memory map motorola 2.3 i/o section addresses $0000?003f, shown in figure 2-2 , contain most of the control, status, and data registers. additional input/output (i/o) registers ( figure 2-3 ) have these addresses: $fe00, sim break status register (sbsr) $fe01, sim reset status register (srsr) $fe03, sim break flag control register (sbfcr) $fe09, flash2 control register (fl2cr) $fe08, flash1 control register (fl1cr) $fe0c and $fe0d, break address registers (brkh and brkl) $fe0e, break status and control register (brkscr) 2.4 random-access memory (ram) the 3584 addresses from $0040?0e3f are ram locations. the location of the stack ram is programmable. the 16-bit stack pointer allows the stack to be anywhere in ram, allowing all page zero locations to be used for i/o control and user data or code. within page zero there are 192 bytes of ram. when the stack pointer is moved from its reset location at $00ff, direct addressing mode instructions can access all page zero ram locations efficiently. page zero ram, therefore, provides ideal locations for frequently accessed global variables. before processing an interrupt, the cpu uses five bytes of the stack to save the contents of the cpu registers. note: to maintain m6805 compatibility, the upper byte of the index register (h) is not stacked automatically. if the interrupt service routine modifies h, then the user must stack and unstack h using the pshh and pulh instructions. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory map memory map mc68hc(9)08lk60 rev. 1.0 advance information motorola memory map 37 non-disclosure agreement required during a subroutine call, the cpu uses two bytes of the stack to store the return address. the stack pointer decrements during pushes and increments during pulls. note: be careful when using nested subroutines or multiple interrupt levels. the cpu may overwrite data in the ram during a subroutine or during the interrupt stacking. 2.5 memory map see figure 2-1 , figure 2-2 , figure 2-3 , and figure 2-4 . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required memory map advance information mc68hc(9)08lk60 rev. 1.0 38 memory map motorola $0000 i/o registers ?64 bytes $003f user ram ?192 bytes stack ?64 bytes $00ff $0100 page 1 user ram ?3392 bytes $0e3f $0e40 unused ?448 bytes $0fff $1000 user flash ?60,928 bytes (~ 60 k) $fdff $fe00 sim registers ?16 bytes $fe10 monitor rom ?240 bytes $feff $ff00 unused ?208 bytes $ffcf $ffd0 user vectors ?48 bytes $ffff figure 2-1. memory map f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory map memory map mc68hc(9)08lk60 rev. 1.0 advance information motorola memory map 39 non-disclosure agreement required addr. register name bit 7 6 5 4 3 2 1 bit 0 $0000 port a data register (pta) read: pta7 pta6 pta5 pta4 pta3 pta2 pta1 pta0 write: reset: unaffected by reset $0001 port b data register (ptb) read: ptb7 ptb6 ptb5 ptb4 ptb3 ptb2 ptb1 ptb0 write: reset: unaffected by reset $0002 port c data register (ptc) read: ptc7 ptc6 ptc5 ptc4 ptc3 ptc2 ptc1 ptc0 write: reset: unaffected by reset $0003 keyboard interrupt enable register (kbier) read: kbie7 kbie6 kbie5 kbie4 kbie3 kbie2 kbie1 kbie0 write: reset: 0 0 0 0 0 0 0 0 $0004 data direction register a (ddra) read: ddra7 ddra6 ddra5 ddra4 ddra3 ddra2 ddra1 ddra0 write: reset: 0 0 0 0 0 0 0 0 $0005 data direction register b (ddrb) read: ddrb7 ddrb6 ddrb5 ddrb4 ddrb3 ddrb2 ddrb1 ddrb0 write: reset: 0 0 0 0 0 0 0 0 $0006 data direction register c (ddrc) read: ddrc7 ddrc6 ddrc5 ddrc4 ddrc3 ddrc2 ddrc1 ddrc0 write: reset: 0 0 0 0 0 0 0 0 $0007 pll control register (pctl) read: pllie pllf pllon bcs pre1 pre0 vpr1 vpr0 write: reset: 0 0 1 0 1 1 1 1 $0008 pll bandwidth control register (pbwc) read: auto lock a cq 0000 r write: reset: 0 0 0 0 0 0 0 0 $0009 pll multiplier select register high (pmsh) read: 0 0 0 0 mul11 mul10 mul9 mul8 write: reset: 0 0 0 0 0 0 0 0 = unimplemented u = undetermined x = indeterminate figure 2-2. control, status, and data registers (sheet 1 of 7) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required memory map advance information mc68hc(9)08lk60 rev. 1.0 40 memory map motorola $000a pll multiplier select register low (pmsl) read: mul7 mul6 mul5 mul4 mul3 mul2 mul1 mul0 write: reset: 0 1 0 0 0 0 0 0 $000b pll vco range select register (pvrs) read: vrs7 vrs6 vrs5 vrs4 vrs3 vrs2 vrs1 vrs0 write: reset: 0 1 0 0 0 0 0 0 $000c pll reference divider select register (prds) read: 0 0 0 0 rds3 rds2 rds1 rds0 write: reset: 0 0 0 0 0 0 0 1 $000d spi control register (spcr) read: sprie dmas spmstr cpol cpha spwom spe sptie write: reset: 0 0 1 0 1 0 0 0 $000e spi status and control register (spscr) read: sprf errie ovrf modf spte modfen spr1 spr0 write: reset: 0 0 0 0 1 0 0 0 $000f spi data register (spdr) read: r7 r6 r5 r4 r3 r2 r1 r0 write: t7 t6 t5 t4 t3 t2 t1 t0 reset: indeterminate after reset $0010 unimplemented $0011 alert control register (alcr) read: 0 0 0 0 al3 al2 al1 al0 write: reset: 0 0 0 0 0 0 0 0 $0012 alert data register (aldr) read: spl7 spl6 spl5 spl4 spl3 spl2 spl1 spl0 write: reset: 0 0 0 0 0 0 0 0 $0013 sci control register 1 (scc1) read: loops ensci 0 m wake ilty pen pty write: reset: 0 0 0 0 0 0 0 0 addr. register name bit 7 6 5 4 3 2 1 bit 0 = unimplemented u = undetermined x = indeterminate figure 2-2. control, status, and data registers (sheet 2 of 7) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory map memory map mc68hc(9)08lk60 rev. 1.0 advance information motorola memory map 41 non-disclosure agreement required $0014 sci control register 2 (scc2) read: sctie tcie scrie ilie te re rwu sbk write: reset: 0 0 0 0 0 0 0 0 $0015 sci control register 3 (scc3) read: r8 t8 dmare dmate orie neie feie peie write: reset: u u 0 0 0 0 0 0 $0016 sci status register 1 (scs1) read: scte tc scrf idle or nf fe pe write: reset: 1 1 0 0 0 0 0 0 $0017 sci status register 2 (scs2) read: bkf rpf write: reset: 0 0 0 0 0 0 0 0 $0018 sci data register (scdr) read: r7 r6 r5 r4 r3 r2 r1 r0 write: t7 t6 t5 t4 t3 t2 t1 t0 reset: unaffected by reset $0019 sci baud rate register (scbr) read: 0 0 0 0 0 scr2 scr1 scr0 write: reset: 0 0 0 0 0 0 0 0 $001a lcd control register (lcdcr) read: duty1 duty0 agon dsmin motmd 0 0 0 write: reset: 0 0 0 0 0 0 0 0 $001b lcd address register (lcdar) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 $001c lcd data register (lcddr) read: bp7 bp6 bp5 bp4 bp3 bp2 bp1 bp0 write: reset: 0 0 0 0 0 0 0 0 $001d irq status and control register (iscr) read: pin2 0 imask2 mode2 irq2dis 0 imask1 mode1 write: ack2 ack1 reset: 0 0 0 0 0 0 0 0 addr. register name bit 7 6 5 4 3 2 1 bit 0 = unimplemented u = undetermined x = indeterminate figure 2-2. control, status, and data registers (sheet 3 of 7) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required memory map advance information mc68hc(9)08lk60 rev. 1.0 42 memory map motorola $001e sci infrared control register (scircr) read: 0 0 0 0 0 tnp1 tnp0 iren write: reset: 0 0 0 0 0 0 0 0 $001f unimplemented $0020 tim status and control register (tsc) read: tof toie tstop 00 ps2 ps1 ps0 write: 0 trst reset: 0 0 0 0 0 0 0 0 $0021 unimplemented $0022 tim counter register high (tcnth) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $0023 tim counter register low (tcntl) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 $0024 tim counter modulo register high (tmodh) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $0025 tim counter modulo register low (tmodl) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 $0026 tim channel 0 status and control register (tsc0) read: ch0f ch0ie ms0b ms0a els0b els0a tov0 ch0max write: 0 reset: 0 0 0 0 0 0 0 0 $0027 tim channel 0 register high (tch0h) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $0028 tim channel 0 register low (tch0l) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 addr. register name bit 7 6 5 4 3 2 1 bit 0 = unimplemented u = undetermined x = indeterminate figure 2-2. control, status, and data registers (sheet 4 of 7) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory map memory map mc68hc(9)08lk60 rev. 1.0 advance information motorola memory map 43 non-disclosure agreement required $0029 tim channel 1 status and control register (tsc1) read: ch1f ch1ie 0 ms1a els1b els1a tov1 ch1max write: 0 reset: 0 0 0 0 0 0 0 0 $002a tim channel 1 register high (tch1h) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $002b tim channel 1 register low (tch1l) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 $002c tim channel 2 status and control register (tsc2) read: ch2f ch2ie ms2b ms2a els2b els2a tov2 ch2max write: 0 reset: 0 0 0 0 0 0 0 0 $002d tim channel 2 register high (tch2h) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $002e tim channel 2 register low (tch2l) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 $002f tim channel 3 status and control register (tsc3) read: ch3f ch3ie 0 ms3a els3b els3a tov3 ch3max write: 0 reset: 0 0 0 0 0 0 0 0 $0030 tim channel 3 register high (tch3h) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $0031 tim channel 3 register low (tch3l) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 $0032 flash2 block protect register (fl2bpr) read: write: bpr3 bpr2 bpr1 bpr0 reset: x x x x 1 1 1 1 addr. register name bit 7 6 5 4 3 2 1 bit 0 = unimplemented u = undetermined x = indeterminate figure 2-2. control, status, and data registers (sheet 5 of 7) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required memory map advance information mc68hc(9)08lk60 rev. 1.0 44 memory map motorola $0033 flash1 block protect register (fl1bpr) read: write: bpr3 bpr2 bpr1 bpr0 reset: x x x x 1 1 1 1 $0034 unimplemented $0035 timebase control register (tbcr) read: rtce 0 chrc crs1 crs0 r tb2x tb0 write: tbclr reset: 0 0 0 0 0 0 0 0 $0036 rtc control register (rtccr read: hrie minie secie chrie chrce alien prq1 prq0 write: reset: 0 0 0 0 0 0 0 0 $0037 rtc status register (rtcsr) read: 0 0 prqf horf minf secf aflg chrf write: reset: 0 0 0 0 0 0 0 0 $0038 chronograph data register (chrdr) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 $0039 rtc seconds register (secr) read: 0 0 sec5 sec4 sec3 sec2 sec1 sec0 write: reset: 0 0 0 0 0 0 0 0 $003a rtc minutes register (minr) read: 0 0 min5 min4 min3 min2 min1 min0 write: reset: 0 0 0 0 0 0 0 0 $003b rtc hours register (horr) read: 0 0 0 hor4 hor3 hor2 hor1 hor0 write: reset: 0 0 0 0 0 0 0 0 $003c alarm minutes register (alrmr) read: 0 0 am5 am4 am3 am2 am1 am0 write: reset: 0 0 0 0 0 0 0 0 addr. register name bit 7 6 5 4 3 2 1 bit 0 = unimplemented u = undetermined x = indeterminate figure 2-2. control, status, and data registers (sheet 6 of 7) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory map memory map mc68hc(9)08lk60 rev. 1.0 advance information motorola memory map 45 non-disclosure agreement required $003d alarm hours register (alrhr) read: 0 0 0 ah4 ah3 ah2 ah1 ah0 write: reset: 0 0 0 0 0 0 0 0 $003e unimplemented $003f unimplemented addr. register name bit 7 6 5 4 3 2 1 bit 0 = unimplemented u = undetermined x = indeterminate figure 2-2. control, status, and data registers (sheet 7 of 7) addr. register name bit 7 654321 bit 0 $fe00 sim break status register (sbsr) read: rrrrrr sbsw r write: note 1 reset: 0 note 1. writing a logic 0 clears sbsw. $fe01 sim reset status register (srsr) read: por pin cop ilop ilad 0 lvi 0 write: reset: 1 0000000 $fe02 reserved $fe03 sim break flag control register (sbfcr) read: bcfe rrrrrrr write: reset: 0 $fe04 reserved $fe05 reserved r = reserved = unimplemented figure 2-3. sim registers (sheet 1 of 2) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required memory map advance information mc68hc(9)08lk60 rev. 1.0 46 memory map motorola $fe06 reserved $fe07 reserved $fe08 reserved $fe09 flash2 control register (fl2cr) read: fdiv1 fdiv0 blk1 blk0 hven marg erase pgm write: reset: 0 0000000 $fe0a reserved $fe0b flash1 control register (fl1cr) read: fdiv1 fdiv0 blk1 blk0 hven marg erase pgm write: reset: 0 0000000 $fe0c break address register high (brkh) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0000000 $fe0d break address register low (brkl) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0000000 $fe0e break status/control register (brkscr) read: brke brka 000000 write: reset: 0 0000000 $fe0f unimplemented addr. register name bit 7 654321 bit 0 r = reserved = unimplemented figure 2-3. sim registers (sheet 2 of 2) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory map memory map mc68hc(9)08lk60 rev. 1.0 advance information motorola memory map 47 non-disclosure agreement required $ffd0 reserved $ffd1 reserved $ffd2 external irq2/kbi vector (high) $ffd3 external irq2/kbi vector (low) $ffd4 sci module transmit vector (high) $ffd5 sci module transmit vector (low) $ffd6 sci module receive vector (high) $ffd7 sci module receive vector (low) $ffd8 sci module error vector (high) $ffd9 sci module error vector (low) $ffda reserved $ffdb reserved $ffdc reserved $ffdd reserved $ffde spi 1 module transmit vector (high) $ffdf spi 1 module transmit vector (low) $ffe0 spi 1 module receive vector (high) $ffe1 spi 1 module receive vector (low) $ffe2 reserved $ffe3 reserved $ffe4 reserved $ffe5 reserved $ffe6 fcm module vector (high) $ffe7 fcm module vector (low) $ffe8 reserved $ffe9 reserved $ffea tim overflow vector (high) $ffeb tim overflow vector (low) $ffec tim channel 3 vector (high) $ffed tim channel 3 vector (low) figure 2-4. vector addresses in flash/rom (sheet 1 of 2) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required memory map advance information mc68hc(9)08lk60 rev. 1.0 48 memory map motorola 2.6 monitor read-only memory (rom) the 240 bytes at addresses $fe10?feff are reserved rom addresses that contain instructions for the monitor functions. for more information, see section 18. monitor rom (mon) . $ffee tim channel 2 vector (high) $ffef tim channel 2 vector (low) $fff0 tim channel 1 vector (high) $fff1 tim channel 1 vector (low) $fff2 tim channel 0 vector (high) $fff3 tim channel 0 vector (low) $fff4 reserved $fff5 reserved $fff6 reserved $fff7 reserved $fff8 pll module vector (high) $fff9 pll module vector (low) $fffa irq1 vector (high) $fffb irq1 vector (low) $fffc swi vector (high) $fffd swi vector (low) $fffe reset vector (high) $ffff reset vector (low) figure 2-4. vector addresses in flash/rom (sheet 2 of 2) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola random-access memory (ram) 49 non-disclosure agreement required advance information mc68hc(9)08lk60 section 3. random-access memory (ram) 3.1 contents 3.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 3.3 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 3.2 introduction this section describes the 3584 bytes of random-access memory (ram). 3.3 functional description addresses $0040?0e3f are ram locations. the location of the stack ram is programmable. the 16-bit stack pointer allows the stack to be anywhere in the 64-kbyte memory space. note: for correct operation, the stack pointer must point only to ram locations. within page zero are 192 bytes of ram. because the location of the stack ram is programmable, all page zero ram locations can be used for i/o (input/output) control and user data or code. when the stack pointer is moved from its reset location at $00ff, direct addressing mode instructions can access all page zero ram locations efficiently. page zero ram, therefore, provides ideal locations for frequently accessed global variables. before processing an interrupt, the cpu uses five bytes of the stack to save the contents of the cpu registers. note: for m6805 compatibility, the h register is not stacked. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required random-access memory (ram) advance information mc68hc(9)08lk60 rev. 1.0 50 random-access memory (ram) motorola during a subroutine call, the cpu uses two bytes of the stack to store the return address. the stack pointer decrements during pushes and increments during pulls. note: be careful when using nested subroutines. the cpu may overwrite data in the ram during a subroutine or during the interrupt stacking operation. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola flash memory 51 non-disclosure agreement required advance information mc68hc(9)08lk60 section 4. flash memory 4.1 contents 4.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 4.3 flash1 functional description . . . . . . . . . . . . . . . . . . . . . . . .52 4.4 flash2 functional description . . . . . . . . . . . . . . . . . . . . . . . .53 4.5 flash1 control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 4.6 flash2 control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 4.7 flash1 block protect register . . . . . . . . . . . . . . . . . . . . . . . .58 4.8 flash2 block protect register . . . . . . . . . . . . . . . . . . . . . . . .59 4.9 block protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 4.10 charge pump frequency control . . . . . . . . . . . . . . . . . . . . . . .61 4.11 flash erase operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61 4.12 flash program and margin read operation . . . . . . . . . . . . .62 4.2 introduction this section describes the operation of the embedded 60-kbyte flash memory. the flash memory consists of two modules: flash1 ?~32 kbytes, address range is $8000?fdff and $ffd0?ffff flash2 ?28 kbytes, address range $1000?7fff flash memory is non-volatile and can be read, programmed, and erased from a single external supply. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required flash memory advance information mc68hc(9)08lk60 rev. 1.0 52 flash memory motorola 4.3 flash1 functional description the flash1 memory array contains 32,304 bytes. an erased bit reads as a logic 0 and a programmed bit reads as a logic 1. program and erase operations are facilitated through control bits in a memory mapped register. for additional details, see 4.11 flash erase operation and 4.12 flash program and margin read operation . memory in the flash array is organized into pages and rows. there are eight pages of memory per row, and for this array, there are eight bytes per page. the minimum erase block size is a single row, 64 bytes. programming is performed on a per-page basis, or for this array, eight bytes at a time. these are the address ranges for the 32-kbyte flash memory: $8000?fdff, user flash array $ffd0?ffff, user vector space addr. register name bit 7 6 5 4 3 2 1 bit 0 $0032 flash2 block protect register (fl2bpr) read: write: bpr3 bpr2 bpr1 bpr0 reset: x x x x 1 1 1 1 $0033 flash1 block protect register (fl1bpr) read: write: bpr3 bpr2 bpr1 bpr0 reset: x x x x 1 1 1 1 $fe09 flash2 control register (fl2cr) read: fdiv1 fdiv0 blk1 blk0 hven marg erase pgm write: reset: 0 0 0 0 0 0 0 0 $fe0b flash1 control register (fl1cr) read: fdiv1 fdiv0 blk1 blk0 hven marg erase pgm write: reset: 0 0 0 0 0 0 0 0 = unimplemented x = indeterminate figure 4-1. flash register summary f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
flash memory flash2 functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola flash memory 53 non-disclosure agreement required when programming the flash, just enough program time must be utilized via an iterative programming algorithm. too much program time can result in a disturb condition in which an erased bit becomes programmed. this can be prevented as long as no more than eight program operations are performed per row before again performing an erase operation. each programmed page is read in margin mode to ensure that the bits are programmed enough for data retention over the device? lifetime. the row architecture for this array is: 4.4 flash2 functional description the flash2 memory array contains 28,672 bytes. an erased bit reads as a logic 0 and a programmed bit reads as a logic 1. program and erase operations are facilitated through control bits in a memory mapped register. details for these operations appear later in this section. memory in the flash array is organized into pages and rows. there are eight pages of memory per row, and for this array, there are eight bytes per page. the minimum erase block size is a single row, 64 bytes. programming is performed on a per page basis, or for this array, eight bytes at a time. address range for the 28-kbyte flash memory is $1000?7fff. when programming the flash, just enough program time must be utilized via an iterative programming algorithm. too much program time can result in a disturb condition in which an erased bit becomes programmed. this can be prevented as long as no more than eight program operations are performed per row before again performing an erase operation. each programmed page is read in margin mode to ensure that the bits are programmed enough for data retention over the device? lifetime. $8000?803f row 0 $8040?807f row 1 $8080?80bf row 2 $ffd0?ffff row 504 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required flash memory advance information mc68hc(9)08lk60 rev. 1.0 54 flash memory motorola 4.5 flash1 control register the flash1 control register (fl1cr) controls flash program, erase, and margin operations. caution: devices with more than one flash have multiple control registers (flcrs.) only one flash control register should be accessed at a time. so, while accessing one control register, ensure that any others are cleared. fdiv0 ?frequency divide control bit this bit selects the factor by which cgmvclk is divided to derive the charge pump frequency. see table 4-3 . note: fdiv1 has no effect. blk1 and blk0 ?block erase control bits these bits control erasing of blocks of varying size. table 4-1 shows the various block sizes which can be erased in one erase operation. in step 4 of the erase operation (see 4.11 flash erase operation ), the upper addresses are latched and used to determine the location of the block to be erased. for the full array, the only requirement is that the target address points to any byte in this array. writing to any address in the array will enable the erase. hven ?high voltage enable bit this read/write bit enables high voltage from the charge pump to the memory for either program or erase operation. it can only be set if either pgm or erase is set. 1 = high voltage enabled to array and charge pump on 0 = high voltage disabled to array and charge pump off address: $fe0b bit 7 654321 bit 0 read: fdiv1 fdiv0 blk1 blk0 hven marg erase pgm write: reset: 00000000 figure 4-2. flash1 control register (fl1cr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
flash memory flash1 control register mc68hc(9)08lk60 rev. 1.0 advance information motorola flash memory 55 non-disclosure agreement required marg ?program margin control bit this read/write bit configures the memory for a program margin operation. it cannot be set if the hven bit is set, and if it is set when hven is set, it will automatically return to 0. 1 = margin operation selected 0 = margin operation unselected erase ?erase control bit this read/write bit configures the memory for erase operation. it is interlocked with the pgm bit such that both bits cannot be set to 1 at the same time. 1 = erase operation selected 0 = erase operation unselected pgm ?program control bit this read/write bit configures the memory for program operation. it is interlocked with the erase bit such that both bits cannot be equal to 1 or set to 1 at the same time. 1 = program operation selected 0 = program operation unselected table 4-1. erase block sizes of flash1 blk1 blk0 block size row boundaries 0 0 full array: 32 kbytes 0-504 ($8000?ffff) 0 1 one-half array: 16 kbytes 0-255 ($8000?bfff) 256-504 ($c000?ffff) 1 0 eight rows: 512 bytes 0? ($8000?81ff) 8?5 ($8200?83ff) 16?3 ($8400?85ff) 496?03 ($fc00?fdff) 1 1 single row: 64 bytes 0 ($8000?803f) 1 ($8040?807f) 504 ($ffd0?ffff) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required flash memory advance information mc68hc(9)08lk60 rev. 1.0 56 flash memory motorola 4.6 flash2 control register the flash2 control register controls flash program, erase, and margin operations. fdiv0 ?frequency divide control bit this bit selects the factor by which cgmvclk is divided to derive the charge pump frequency. see table 4-3 . note: fdiv1 has no effect. blk1 and blk0 ?block erase control bits these bits control erasing of blocks of varying size. table 4-2 shows the various block sizes which can be erased in one erase operation. in step 4 of the erase operation (see 4.11 flash erase operation ), the upper addresses are latched and used to determine the location of the block to be erased. for the full array, the only requirement is that the target address points to any byte in this array. writing to any address in the array will enable the erase. address: $fe09 bit 7 654321 bit 0 read: fdiv1 fdiv0 blk1 blk0 hven marg erase pgm write: reset: 00000000 figure 4-3. flash2 control register (fl2cr) table 4-2. erase block sizes of flash2 blk1 blk0 block size row boundaries 0 0 full array: 28 kbytes $1000?7fff 0 1 one-half array 12 kbytes; $1000?3fff 16 kbytes; $4000?7fff 1 0 eight rows: 512 bytes 1 1 single row: 64 bytes f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
flash memory flash2 control register mc68hc(9)08lk60 rev. 1.0 advance information motorola flash memory 57 non-disclosure agreement required hven ?high-voltage enable bit this read/write bit enables high voltage from the charge pump to the memory for either program or erase operation. it can only be set if either pgm or erase is set. 1 = high voltage enabled to array and charge pump on 0 = high voltage disabled to array and charge pump off marg ?program margin control bit this read/write bit configures the memory for a program margin operation. it cannot be set if the hven bit is set, and if it is set when hven is set, it will automatically return to 0. 1 = margin operation selected 0 = margin operation unselected erase ?erase control bit this read/write bit configures the memory for erase operation. it is interlocked with the pgm bit such that both bits cannot be set to 1 at the same time. 1 = erase operation selected 0 = erase operation unselected pgm ?program control bit this read/write bit configures the memory for program operation. it is interlocked with the erase bit such that both bits cannot be equal to 1 or set to 1 at the same time. 1 = program operation selected 0 = program operation unselected f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required flash memory advance information mc68hc(9)08lk60 rev. 1.0 58 flash memory motorola 4.7 flash1 block protect register the block protect register is implemented as an input/output (i/o) register. each bit, when programmed, protects a range of addresses in the flash. bpr3 ?block protect register bit 3 this bit protects the memory contents in the address range $c000?ffff. 1 = address range protected from erase or program 0 = address range open to erase or program bpr2 ?block protect register bit 2 this bit protects the memory contents in the address range $a000?ffff. 1 = address range protected from erase or program 0 = address range open to erase or program bpr1 ?block protect register bit 1 this bit protects the memory contents in the address range $9000?ffff. 1 = address range protected from erase or program 0 = address range open to erase or program bpr0 ?block protect register bit 0 this bit protects the memory contents in the address range $8000?ffff. 1 = address range protected from erase or program 0 = address range open to erase or program address: $0033 bit 7 654321 bit 0 read: write: bpr3 bpr2 bpr1 bpr0 reset: x x x x 1111 = unimplemented x = indeterminate figure 4-4. flash1 block protect register (fl1bpr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
flash memory flash2 block protect register mc68hc(9)08lk60 rev. 1.0 advance information motorola flash memory 59 non-disclosure agreement required by programming the block protect bits, a portion of the memory will be locked so that no further erase or program operations may be performed. programming more than one bit at a time is redundant. for instance, if both bpr3 and bpr2 are set, the address range $a000?ffff is locked. if all bits are cleared, then all of the memory is available for erase and program. 4.8 flash2 block protect register the block protect register is implemented as an i/o register. each bit, when programmed, protects a range of addresses in the flash. bpr3 ?block protect register bit 3 this bit protects the upper half portion of full-size 32-k array. since flash2 is 28 kbytes, the block protect address range is $4000?7fff. 1 = address range protected from erase or program 0 = address range open to erase or program bpr2 block protect register bit 2 this bit protects the upper 3/4 portion of full-size 32-k array. since flash2 is 28 kbytes, the block protect address range is $2000?7fff. 1 = address range protected from erase or program 0 = address range open to erase or program address: $0032 bit 7 654321 bit 0 read: write: bpr3 bpr2 bpr1 bpr0 reset: x x x x 1111 = unimplemented x = indeterminate figure 4-5. flash2 block protect register (fl2bpr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required flash memory advance information mc68hc(9)08lk60 rev. 1.0 60 flash memory motorola bpr1 ?block protect register bit 1 this bit protects the upper 7/8 portion of a full size 32-k array. since flash2 is 28 kbytes, the block protect address range is $1000?7fff. 1 = address range protected from erase or program 0 = address range open to erase or program bpr0 ?block protect register bit 0 this bit protects all the memory contents in the address range $1000?7fff. 1 = address range protected from erase or program 0 = address range open to erase or program by programming the block protect bits, a portion of the memory will be locked so that no further erase or program operations may be performed. programming more than one bit at a time is redundant. if both bpr3 and bpr2 are set, for instance, the address range $2000?7fff is locked. if all bits are cleared, then all of the memory is available for erase and program. 4.9 block protection because of the ability of the on-board charge pump to erase and program the flash memory in the target application, provision is made for protecting blocks of memory from unintentional erase or program operations. this protection is done by reserving a location in the i/o space for block protect information. if the address range for an erase or program operation includes a protected block, the pgm or erase bit is cleared which prevents the hven bit in the flash control register from being set so that no high voltage is allowed in the array. when the block protect register is cleared, the entire memory is accessible for program and erase. when bits within the register are programmed, they lock blocks of memory address ranges as shown in 4.7 flash1 block protect register and 4.8 flash2 block protect register . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
flash memory charge pump frequency control mc68hc(9)08lk60 rev. 1.0 advance information motorola flash memory 61 non-disclosure agreement required 4.10 charge pump frequency control the internal charge pump for this array is to be operated over the specified frequency range (refer to table 4-3 ). the pll output clock, cgmvclk, is used to derive the two quadrature clocks, vclk12 and vclk23, which are one-half cgmvclk. additional pump frequency control is provided using the fdiv0 bit in order to keep the vclks within the specified range. the pll must be on and locked (but not necessarily engaged) before program/erase operations can be performed. 4.11 flash erase operation note: after a total of eight program operations has been applied to a row, the row must be erased before further use in order to avoid a disturb condition. an erased byte will read $00. in 20.16 flash memory electrical characteristics , a detailed description of the times used in this algorithm is given. use this procedure to erase a block of flash memory: 1. establish pump frequency by configuring pll. 2. unprotect target portion of the array, bpr0?pr3. 3. set the erase bit, the blk0, blk1, and fdiv0 bits in the flash control register. 4. write to any flash address with any data within the block address range desired. 5. set the hven bit. 6. wait for a time, t e rase . table 4-3. charge pump clock frequency fdiv0 pump clock frequency 0 cgmvclk 2 1 cgmvclk 4 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required flash memory advance information mc68hc(9)08lk60 rev. 1.0 62 flash memory motorola 7. clear the hven bit. 8. wait for a time, t k ill , for the high voltages to dissipate. 9. clear the erase bit. 10. after a time, t hvd , the memory can be accessed in read mode again. caution: these operations must be performed in the order as shown, but other unrelated operations may occur between the steps. do not exceed t erase maximum. 4.12 flash program and margin read operation programming of this flash array is done on a page basis where one page equals eight bytes. the purpose of the margin read mode is to ensure that data has been programmed with sufficient margin for long term data retention. during a margin read, the control gates of the selected memory bits are held at a slightly negative voltage by an internal charge pump. reading the data in margin mode is the same as for ordinary read mode except that a built-in counter stretches the data access for an additional eight cycles to allow sensing of the lower cell current. in short, a margin read applies a more stringent condition on the bitcell during read which ensures the data will be valid throughout the life of the product. a margin read can only follow a program operation. refer to section 20. preliminary electrical specifications . the procedure for programming the flash memory is: 1. establish pump frequency by configuring the pll. 2. set the pgm bit and program fdiv0 appropriately. this configures the memory for program operation and enables the latching of address and data for programming. 3. write data to the page (eight bytes) being programmed. 4. set the hven bit. 5. wait for a time, t step . 6. clear the hven bit. 7. wait for a time, t hvtv . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
flash memory flash program and margin read operation mc68hc(9)08lk60 rev. 1.0 advance information motorola flash memory 63 non-disclosure agreement required 8. set the marg bit. 9. wait for a time, t vtp . 10. clear the pgm bit. 11. wait for a time, t hvd . 12. read the page of data (this is in margin mode.) 13. clear the marg bit. 14. if any programmed bits do not read correctly, repeat the process from step 2 through step 13 up to maximum program pulses (see section 20. preliminary electrical specifications ). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required flash memory advance information mc68hc(9)08lk60 rev. 1.0 64 flash memory motorola figure 4-6. page program algorithm program 60-k flash initialize attempt set pgm bit and fdiv bits wait t hvtv wait t vtp set hven bit clear pgm bit set margin bit wait t hvd increment attempt y counter to 0 y n programming operation failed programming operation complete write data to selected page wait t step clear hven bit read page of data clear margin bit read data equal to write data? attempt count equal to 5? note: this page program algorithm assumes the pll is on and locked and the page to be programmed has been erased before entry. counter n f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola central processor unit (cpu) 65 non-disclosure agreement required advance information mc68hc(9)08lk60 section 5. central processor unit (cpu) 5.1 contents 5.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 5.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 5.4 cpu registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 5.4.1 accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 5.4.2 index register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 5.4.3 stack pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69 5.4.4 program counter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70 5.4.5 condition code register . . . . . . . . . . . . . . . . . . . . . . . . . . .71 5.5 arithmetic/logic unit (alu) . . . . . . . . . . . . . . . . . . . . . . . . . . .73 5.6 cpu during break interrupts . . . . . . . . . . . . . . . . . . . . . . . . . .73 5.7 instruction set summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74 5.8 opcode map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80 5.2 introduction this section describes the central processor unit (cpu08, version a). the m68hc08 cpu is an enhanced and fully object-code-compatible version of the m68hc05 cpu. the cpu08 reference manual (motorola document order number cpu08rm/ad) contains a description of the cpu instruction set, addressing modes, and architecture. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required central processor unit (cpu) advance information mc68hc(9)08lk60 rev. 1.0 66 central processor unit (cpu) motorola 5.3 features features of the cpu include: fully upward, object-code compatibility with m68hc05 family 16-bit stack pointer with stack manipulation instructions 16-bit index register with x-register manipulation instructions 4-mhz cpu internal bus frequency characterized at 3 volts 64-kbyte program/data memory space 16 addressing modes memory-to-memory data moves without using accumulator fast 8-bit by 8-bit multiply and 16-bit by 8-bit divide instructions enhanced binary-coded decimal (bcd) data handling modular architecture with expandable internal bus definition for extension of addressing range beyond 64 kbytes low-power stop mode and wait mode note: stop mode is disabled on the mc68hc(9)08lk60. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
central processor unit (cpu) cpu registers mc68hc(9)08lk60 rev. 1.0 advance information motorola central processor unit (cpu) 67 non-disclosure agreement required 5.4 cpu registers figure 5-1 shows the five cpu registers. cpu registers are not part of the memory map. figure 5-1. cpu registers accumulator (a) index register (h:x) stack pointer (sp) program counter (pc) condition code register (ccr) carry/borrow flag zero flag negative flag interrupt mask half-carry flag two? complement overflow flag v11hinzc h x 0 0 0 0 7 15 15 15 70 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required central processor unit (cpu) advance information mc68hc(9)08lk60 rev. 1.0 68 central processor unit (cpu) motorola 5.4.1 accumulator the accumulator (a) is a general-purpose 8-bit register. the cpu uses the accumulator to hold operands and the results of arithmetic/logic operations. 5.4.2 index register the 16-bit index register allows indexed addressing of a 64-kbyte memory space. h is the upper byte of the index register, and x is the lower byte. h:x is the concatenated 16-bit index register. in the indexed addressing modes, the cpu uses the contents of the index register to determine the conditional address of the operand. the index register can serve also as a temporary data storage location. bit 7 6 5 4 3 2 1 bit 0 read: write: reset: unaffected by reset figure 5-2. accumulator (a) bit 151413121110987654321 bit 0 read: write: reset: 00000000 xxxxxxxx x = indeterminate figure 5-3. index register (h:x) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
central processor unit (cpu) cpu registers mc68hc(9)08lk60 rev. 1.0 advance information motorola central processor unit (cpu) 69 non-disclosure agreement required 5.4.3 stack pointer the stack pointer (sp) is a 16-bit register that contains the address of the next location on the stack. during a reset, the stack pointer is preset to $00ff. the reset stack pointer (rsp) instruction sets the least significant byte (lsb) to $ff and does not affect the most significant byte (msb). the stack pointer decrements as data is pushed onto the stack and increments as data is pulled from the stack. in the stack pointer 8-bit offset and 16-bit offset addressing modes, the stack pointer can function as an index register to access data on the stack. the cpu uses the contents of the stack pointer to determine the conditional address of the operand. note: the location of the stack is arbitrary and may be relocated anywhere in ram. moving the sp out of page zero ($0000 to $00ff) frees direct address (page zero) space. for correct operation, the stack pointer must point to ram locations only. bit 151413121110987654321 bit 0 read: write: reset: 0000000011111111 figure 5-4. stack pointer (sp) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required central processor unit (cpu) advance information mc68hc(9)08lk60 rev. 1.0 70 central processor unit (cpu) motorola 5.4.4 program counter the program counter (pc) is a 16-bit register that contains the address of the next instruction or operand to be fetched. normally, the program counter automatically increments to the next sequential memory location every time an instruction or operand is fetched. jump, branch, and interrupt operations load the program counter with an address other than that of the next sequential location. during reset, the program counter is loaded with the reset vector address located at $fffe and $ffff. the vector address is the address of the first instruction to be executed after exiting the reset state. bit 151413121110987654321 bit 0 read: write: reset: loaded with vector from $fffe and $ffff figure 5-5. program counter (pc) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
central processor unit (cpu) cpu registers mc68hc(9)08lk60 rev. 1.0 advance information motorola central processor unit (cpu) 71 non-disclosure agreement required 5.4.5 condition code register the 8-bit condition code register (ccr) contains the interrupt mask and five flags that indicate the results of the instruction just executed. bits 6 and 5 are set permanently to logic 1. the following paragraphs describe the functions of the condition code register. v ?overflow flag the cpu sets the overflow flag when a two's complement overflow occurs. the signed branch instructions bgt, bge, ble, and blt use the overflow flag. 1 = overflow 0 = no overflow h ?half-carry flag the cpu sets the half-carry flag when a carry occurs between accumulator bits 3 and 4 during an adc (add with carry) or add (add without carry) operation. the half-carry flag is required for binary- coded decimal (bcd) arithmetic operations. the daa (decimal adjust a) instruction uses the states of the h and c flags to determine the appropriate correction factor. 1 = carry between bits 3 and 4 0 = no carry between bits 3 and 4 bit 7 6 5 4 3 2 1 bit 0 read: v11h i nzc write: reset: x 1 1 x 1 x x x x = indeterminate figure 5-6. condition code register (ccr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required central processor unit (cpu) advance information mc68hc(9)08lk60 rev. 1.0 72 central processor unit (cpu) motorola i ?interrupt mask when the interrupt mask is set, all maskable cpu interrupts are disabled. cpu interrupts are enabled when the interrupt mask is cleared. when a cpu interrupt occurs, the interrupt mask is set automatically after the cpu registers are saved on the stack, but before the interrupt vector is fetched. 1 = interrupts disabled 0 = interrupts enabled note: to maintain m6805 compatibility, the upper byte of the index register (h) is not stacked automatically. if the interrupt service routine modifies h, then the user must stack and unstack h using the pshh and pulh instructions. after the i bit is cleared, the highest-priority interrupt request is serviced first. a return-from-interrupt (rti) instruction pulls the cpu registers from the stack and restores the interrupt mask from the stack. after any reset, the interrupt mask is set and can be cleared only by the clear interrupt mask software instruction (cli). n negative flag the cpu sets the negative flag when an arithmetic operation, logic operation, or data manipulation produces a negative result, setting bit 7 of the result. 1 = negative result 0 = non-negative result z ?zero flag the cpu sets the zero flag when an arithmetic operation, logic operation, or data manipulation produces a result of $00. 1 = zero result 0 = non-zero result f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
central processor unit (cpu) arithmetic/logic unit (alu) mc68hc(9)08lk60 rev. 1.0 advance information motorola central processor unit (cpu) 73 non-disclosure agreement required c carry/borrow flag the cpu sets the carry/borrow flag when an addition operation produces a carry out of bit 7 of the accumulator or when a subtraction operation requires a borrow. some instructions such as bit test and branch, shift, and rotate ?also clear or set the carry/borrow flag. 1 = carry out of bit 7 0 = no carry out of bit 7 5.5 arithmetic/logic unit (alu) the alu performs the arithmetic and logic operations defined by the instruction set. refer to the cpu08 reference manual (motorola document number cpu08rm/ad) for a description of the instructions and addressing modes and more detail about cpu architecture. 5.6 cpu during break interrupts if the break module is enabled, a break interrupt causes the cpu to execute the software interrupt instruction (swi) at the completion of the current cpu instruction. (see section 9. break module .) the program counter vectors to $fffc?fffd ($fefc?fefd in monitor mode). a return-from-interrupt instruction (rti) in the break routine ends the break interrupt and returns the mcu to normal operation if the break interrupt has been deasserted. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required central processor unit (cpu) advance information mc68hc(9)08lk60 rev. 1.0 74 central processor unit (cpu) motorola 5.7 instruction set summary table 5-1. instruction set summary source form operation description effect on ccr address mode opcode operand cycles vh i nzc adc # opr adc opr adc opr adc opr ,x adc opr ,x adc ,x adc opr ,sp adc opr ,sp add with carry a (a) + (m) + (c) ?? ??? imm dir ext ix2 ix1 ix sp1 sp2 a9 b9 c9 d9 e9 f9 9ee9 9ed9 ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 add # opr add opr add opr add opr ,x add opr ,x add ,x add opr ,sp add opr ,sp add without carry a (a) + (m) ?? ??? imm dir ext ix2 ix1 ix sp1 sp2 ab bb cb db eb fb 9eeb 9edb ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 ais # opr add immediate value (signed) to sp sp (sp) + (16 m) imm a7 ii 2 aix # opr add immediate value (signed) to h:x h:x (h:x) + (16 m) imm af ii 2 and # opr and opr and opr and opr ,x and opr ,x and ,x and opr ,sp and opr ,sp logical and a (a) & (m) 0 ?? imm dir ext ix2 ix1 ix sp1 sp2 a4 b4 c4 d4 e4 f4 9ee4 9ed4 ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 asl opr asla aslx asl opr ,x asl ,x asl opr ,sp arithmetic shift left (same as lsl) ? ??? dir inh inh ix1 ix sp1 38 48 58 68 78 9e68 dd ff ff 4 1 1 4 3 5 asr opr asra asrx asr opr ,x asr opr ,x asr opr ,sp arithmetic shift right ? ??? dir inh inh ix1 ix sp1 37 47 57 67 77 9e67 dd ff ff 4 1 1 4 3 5 bcc rel branch if carry bit clear pc (pc) + 2 + rel ? (c) = 0 rel 24 rr 3 bclr n , opr clear bit n in m mn 0 dir (b0) dir (b1) dir (b2) dir (b3) dir (b4) dir (b5) dir (b6) dir (b7) 11 13 15 17 19 1b 1d 1f dd dd dd dd dd dd dd dd 4 4 4 4 4 4 4 4 bcs rel branch if carry bit set (same as blo) pc (pc) + 2 + rel ? (c) = 1 rel 25 rr 3 beq rel branch if equal pc (pc) + 2 + rel ? (z) = 1 rel 27 rr 3 bge opr branch if greater than or equal to (signed operands) pc (pc) + 2 + rel ? (n v ) = 0 rel 90 rr 3 c b0 b7 0 b0 b7 c f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
central processor unit (cpu) instruction set summary mc68hc(9)08lk60 rev. 1.0 advance information motorola central processor unit (cpu) 75 non-disclosure agreement required bgt opr branch if greater than (signed operands) pc (pc) + 2 + rel ? (z) | (n v ) = 0 rel 92 rr 3 bhcc rel branch if half carry bit clear pc (pc) + 2 + rel ? (h) = 0 rel 28 rr 3 bhcs rel branch if half carry bit set pc (pc) + 2 + rel ? (h) = 1 rel 29 rr 3 bhi rel branch if higher pc (pc) + 2 + rel ? (c) | (z) = 0 rel 22 rr 3 bhs rel branch if higher or same (same as bcc) pc (pc) + 2 + rel ? (c) = 0 rel 24 rr 3 bih rel branch if irq pin high pc (pc) + 2 + rel ? irq = 1 rel 2f rr 3 bil rel branch if irq pin low pc (pc) + 2 + rel ? irq = 0 rel 2e rr 3 bit # opr bit opr bit opr bit opr ,x bit opr ,x bit ,x bit opr ,sp bit opr ,sp bit test (a) & (m) 0 ?? imm dir ext ix2 ix1 ix sp1 sp2 a5 b5 c5 d5 e5 f5 9ee5 9ed5 ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 ble opr branch if less than or equal to (signed operands) pc (pc) + 2 + rel ? (z) | (n v ) = 1 rel 93 rr 3 blo rel branch if lower (same as bcs) pc (pc) + 2 + rel ? (c) = 1 rel 25 rr 3 bls rel branch if lower or same pc (pc) + 2 + rel ? (c) | (z) = 1 rel 23 rr 3 blt opr branch if less than (signed operands) pc (pc) + 2 + rel ? (n v ) = 1 rel 91 rr 3 bmc rel branch if interrupt mask clear pc (pc) + 2 + rel ? (i) = 0 rel 2c rr 3 bmi rel branch if minus pc (pc) + 2 + rel ? (n) = 1 rel 2b rr 3 bms rel branch if interrupt mask set pc (pc) + 2 + rel ? (i) = 1 rel 2d rr 3 bne rel branch if not equal pc (pc) + 2 + rel ? (z) = 0 rel 26 rr 3 bpl rel branch if plus pc (pc) + 2 + rel ? (n) = 0 rel 2a rr 3 bra rel branch always pc (pc) + 2 + rel rel 20 rr 3 brclr n , opr , rel branch if bit n in m clear pc (pc) + 3 + rel ? (mn) = 0 ? dir (b0) dir (b1) dir (b2) dir (b3) dir (b4) dir (b5) dir (b6) dir (b7) 01 03 05 07 09 0b 0d 0f dd rr dd rr dd rr dd rr dd rr dd rr dd rr dd rr 5 5 5 5 5 5 5 5 brn rel branch never pc (pc) + 2 rel 21 rr 3 brset n , opr , rel branch if bit n in m set pc (pc) + 3 + rel ? (mn) = 1 ? dir (b0) dir (b1) dir (b2) dir (b3) dir (b4) dir (b5) dir (b6) dir (b7) 00 02 04 06 08 0a 0c 0e dd rr dd rr dd rr dd rr dd rr dd rr dd rr dd rr 5 5 5 5 5 5 5 5 table 5-1. instruction set summary (continued) source form operation description effect on ccr address mode opcode operand cycles vh i nzc f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required central processor unit (cpu) advance information mc68hc(9)08lk60 rev. 1.0 76 central processor unit (cpu) motorola bset n , opr set bit n in m mn 1 dir (b0) dir (b1) dir (b2) dir (b3) dir (b4) dir (b5) dir (b6) dir (b7) 10 12 14 16 18 1a 1c 1e dd dd dd dd dd dd dd dd 4 4 4 4 4 4 4 4 bsr rel branch to subroutine pc (pc) + 2; push (pcl) sp (sp) ?1; push (pch) sp (sp) ?1 pc (pc) + rel rel ad rr 4 cbeq opr,rel cbeqa # opr,rel cbeqx # opr,rel cbeq opr, x+ ,rel cbeq x+ ,rel cbeq opr, sp ,rel compare and branch if equal pc (pc) + 3 + rel ? (a) ?(m) = $00 pc (pc) + 3 + rel ? (a) ?(m) = $00 pc (pc) + 3 + rel ? (x) ?(m) = $00 pc (pc) + 3 + rel ? (a) ?(m) = $00 pc (pc) + 2 + rel ? (a) ?(m) = $00 pc (pc) + 4 + rel ? (a) ?(m) = $00 dir imm imm ix1+ ix+ sp1 31 41 51 61 71 9e61 dd rr ii rr ii rr ff rr rr ff rr 5 4 4 5 4 6 clc clear carry bit c 0 0 inh 98 1 cli clear interrupt mask i 0 0 inh 9a 2 clr opr clra clrx clrh clr opr ,x clr ,x clr opr ,sp clear m $00 a $00 x $00 h $00 m $00 m $00 m $00 001 dir inh inh inh ix1 ix sp1 3f 4f 5f 8c 6f 7f 9e6f dd ff ff 3 1 1 1 3 2 4 cmp # opr cmp opr cmp opr cmp opr ,x cmp opr ,x cmp ,x cmp opr ,sp cmp opr ,sp compare a with m (a) ?(m) ? ??? imm dir ext ix2 ix1 ix sp1 sp2 a1 b1 c1 d1 e1 f1 9ee1 9ed1 ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 com opr coma comx com opr ,x com ,x com opr ,sp complement (ones complement) m ( m) = $ff ?(m) a ( a) = $ff ?(m) x ( x) = $ff ?(m) m ( m) = $ff ?(m) m ( m) = $ff ?(m) m ( m) = $ff ?(m) 0 ?? 1 dir inh inh ix1 ix sp1 33 43 53 63 73 9e63 dd ff ff 4 1 1 4 3 5 cphx # opr cphx opr compare h:x with m (h:x) ?(m:m + 1) ? ??? imm dir 65 75 ii ii+1 dd 3 4 cpx # opr cpx opr cpx opr cpx ,x cpx opr ,x cpx opr ,x cpx opr ,sp cpx opr ,sp compare x with m (x) ?(m) ? ??? imm dir ext ix2 ix1 ix sp1 sp2 a3 b3 c3 d3 e3 f3 9ee3 9ed3 ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 daa decimal adjust a (a) 10 u ??? inh 72 2 table 5-1. instruction set summary (continued) source form operation description effect on ccr address mode opcode operand cycles vh i nzc f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
central processor unit (cpu) instruction set summary mc68hc(9)08lk60 rev. 1.0 advance information motorola central processor unit (cpu) 77 non-disclosure agreement required dbnz opr,rel dbnza rel dbnzx rel dbnz opr, x ,rel dbnz x ,rel dbnz opr, sp ,rel decrement and branch if not zero a (a) 1 or m (m) 1 or x (x) 1 pc (pc) + 3 + rel ? (result) 0 pc (pc) + 2 + rel ? (result) 0 pc (pc) + 2 + rel ? (result) 0 pc (pc) + 3 + rel ? (result) 0 pc (pc) + 2 + rel ? (result) 0 pc (pc) + 4 + rel ? (result) 0 dir inh inh ix1 ix sp1 3b 4b 5b 6b 7b 9e6b dd rr rr rr ff rr rr ff rr 5 3 3 5 4 6 dec opr deca decx dec opr ,x dec ,x dec opr ,sp decrement m (m) ?1 a (a) ?1 x (x) ?1 m (m) ?1 m (m) ?1 m (m) ?1 ? ?? dir inh inh ix1 ix sp1 3a 4a 5a 6a 7a 9e6a dd ff ff 4 1 1 4 3 5 div divide a (h:a)/(x) h remainder ?? inh 52 7 eor # opr eor opr eor opr eor opr ,x eor opr ,x eor ,x eor opr ,sp eor opr ,sp exclusive or m with a a (a m) 0 ?? imm dir ext ix2 ix1 ix sp1 sp2 a8 b8 c8 d8 e8 f8 9ee8 9ed8 ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 inc opr inca incx inc opr ,x inc ,x inc opr ,sp increment m (m) + 1 a (a) + 1 x (x) + 1 m (m) + 1 m (m) + 1 m (m) + 1 ? ?? dir inh inh ix1 ix sp1 3c 4c 5c 6c 7c 9e6c dd ff ff 4 1 1 4 3 5 jmp opr jmp opr jmp opr ,x jmp opr ,x jmp ,x jump pc jump address dir ext ix2 ix1 ix bc cc dc ec fc dd hh ll ee ff ff 2 3 4 3 2 jsr opr jsr opr jsr opr ,x jsr opr ,x jsr ,x jump to subroutine pc (pc) + n ( n = 1, 2, or 3) push (pcl); sp (sp) ?1 push (pch); sp (sp) ?1 pc unconditional address dir ext ix2 ix1 ix bd cd dd ed fd dd hh ll ee ff ff 4 5 6 5 4 lda # opr lda opr lda opr lda opr ,x lda opr ,x lda ,x lda opr ,sp lda opr ,sp load a from m a (m) 0 ?? imm dir ext ix2 ix1 ix sp1 sp2 a6 b6 c6 d6 e6 f6 9ee6 9ed6 ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 ldhx # opr ldhx opr load h:x from m h:x ( m:m + 1 ) 0 ?? imm dir 45 55 ii jj dd 3 4 ldx # opr ldx opr ldx opr ldx opr ,x ldx opr ,x ldx ,x ldx opr ,sp ldx opr ,sp load x from m x (m) 0 ?? imm dir ext ix2 ix1 ix sp1 sp2 ae be ce de ee fe 9eee 9ede ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 table 5-1. instruction set summary (continued) source form operation description effect on ccr address mode opcode operand cycles vh i nzc f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required central processor unit (cpu) advance information mc68hc(9)08lk60 rev. 1.0 78 central processor unit (cpu) motorola lsl opr lsla lslx lsl opr ,x lsl ,x lsl opr ,sp logical shift left (same as asl) ? ??? dir inh inh ix1 ix sp1 38 48 58 68 78 9e68 dd ff ff 4 1 1 4 3 5 lsr opr lsra lsr x lsr opr ,x lsr ,x lsr opr ,sp logical shift right ? 0 ?? dir inh inh ix1 ix sp1 34 44 54 64 74 9e64 dd ff ff 4 1 1 4 3 5 mov opr,opr mov opr, x+ mov # opr,opr mov x+ ,opr move (m) destination (m) source h:x (h:x) + 1 (ix+d, dix+) 0 ?? dd dix+ imd ix+d 4e 5e 6e 7e dd dd dd ii dd dd 5 4 4 4 mul unsigned multiply x:a (x) (a) 0 0 inh 42 5 neg opr nega negx neg opr ,x neg ,x neg opr ,sp negate (twos complement) m ?m) = $00 ?(m) a ?a) = $00 ?(a) x ?x) = $00 ?(x) m ?m) = $00 ?(m) m ?m) = $00 ?(m) ? ??? dir inh inh ix1 ix sp1 30 40 50 60 70 9e60 dd ff ff 4 1 1 4 3 5 nop no operation none inh 9d 1 nsa nibble swap a a (a[3:0]:a[7:4]) inh 62 3 ora # opr ora opr ora opr ora opr ,x ora opr ,x ora ,x ora opr ,sp ora opr ,sp inclusive or a and m a (a) | (m) 0 ?? imm dir ext ix2 ix1 ix sp1 sp2 aa ba ca da ea fa 9eea 9eda ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 psha push a onto stack push (a); sp (sp ) 1 inh 87 2 pshh push h onto stack push (h) ; sp (sp ) 1 inh 8b 2 pshx push x onto stack push (x) ; sp (sp ) 1 inh 89 2 pula pull a from stack sp (sp + 1); pull ( a ) inh 86 2 pulh pull h from stack sp (sp + 1); pull ( h ) inh 8a 2 pulx pull x from stack sp (sp + 1); pull ( x ) inh 88 2 rol opr rola rolx rol opr ,x rol ,x rol opr ,sp rotate left through carry ? ??? dir inh inh ix1 ix sp1 39 49 59 69 79 9e69 dd ff ff 4 1 1 4 3 5 ror opr rora rorx ror opr ,x ror ,x ror opr ,sp rotate right through carry ? ??? dir inh inh ix1 ix sp1 36 46 56 66 76 9e66 dd ff ff 4 1 1 4 3 5 table 5-1. instruction set summary (continued) source form operation description effect on ccr address mode opcode operand cycles vh i nzc c b0 b7 0 b0 b7 c 0 c b0 b7 b0 b7 c f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
central processor unit (cpu) instruction set summary mc68hc(9)08lk60 rev. 1.0 advance information motorola central processor unit (cpu) 79 non-disclosure agreement required rsp reset stack pointer sp $ff inh 9c 1 rti return from interrupt sp (sp) + 1; pull (ccr) sp (sp) + 1; pull (a) sp (sp) + 1; pull (x) sp (sp) + 1; pull (pch) sp (sp) + 1; pull (pcl) ?????? inh 80 7 rts return from subroutine sp sp + 1 ; pull ( pch) sp sp + 1; pull (pcl) inh 81 4 sbc # opr sbc opr sbc opr sbc opr ,x sbc opr ,x sbc ,x sbc opr ,sp sbc opr ,sp subtract with carry a (a) ?(m) ?(c) ? ??? imm dir ext ix2 ix1 ix sp1 sp2 a2 b2 c2 d2 e2 f2 9ee2 9ed2 ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 sec set carry bit c 1 1 inh 99 1 sei set interrupt mask i 1 1 inh 9b 2 sta opr sta opr sta opr ,x sta opr ,x sta ,x sta opr ,sp sta opr ,sp store a in m m (a) 0 ?? dir ext ix2 ix1 ix sp1 sp2 b7 c7 d7 e7 f7 9ee7 9ed7 dd hh ll ee ff ff ff ee ff 3 4 4 3 2 4 5 sthx opr store h:x in m (m:m + 1) (h:x) 0 ?? dir 35 dd 4 stop enable irq pin; stop oscillator i 0; stop oscillator 0 inh 8e 1 stx opr stx opr stx opr ,x stx opr ,x stx ,x stx opr ,sp stx opr ,sp store x in m m (x) 0 ?? dir ext ix2 ix1 ix sp1 sp2 bf cf df ef ff 9eef 9edf dd hh ll ee ff ff ff ee ff 3 4 4 3 2 4 5 sub # opr sub opr sub opr sub opr ,x sub opr ,x sub ,x sub opr ,sp sub opr ,sp subtract a (a) (m) ? ??? imm dir ext ix2 ix1 ix sp1 sp2 a0 b0 c0 d0 e0 f0 9ee0 9ed0 ii dd hh ll ee ff ff ff ee ff 2 3 4 4 3 2 4 5 swi software interrupt pc (pc) + 1; push (pcl) sp (sp) ?1; push (pch) sp (sp) ?1; push (x) sp (sp) ?1; push (a) sp (sp) ?1; push (ccr) sp (sp) ?1; i 1 pch interrupt vector high byte pcl interrupt vector low byte 1inh 83 9 tap transfer a to ccr ccr (a) ?????? inh 84 2 tax transfer a to x x (a) inh 97 1 tpa transfer ccr to a a (ccr) inh 85 1 table 5-1. instruction set summary (continued) source form operation description effect on ccr address mode opcode operand cycles vh i nzc f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required central processor unit (cpu) advance information mc68hc(9)08lk60 rev. 1.0 80 central processor unit (cpu) motorola 5.8 opcode map see table 5-2 . tst opr tsta tstx tst opr ,x tst ,x tst opr ,sp test for negative or zero (a) ?$00 or (x) ?$00 or (m) ?$00 0 ?? dir inh inh ix1 ix sp1 3d 4d 5d 6d 7d 9e6d dd ff ff 3 1 1 3 2 4 tsx transfer sp to h:x h:x (sp) + 1 inh 95 2 txa transfer x to a a (x) inh 9f 1 txs transfer h:x to sp (sp) (h:x) ?1 inh 94 2 a accumulator n any bit c carry/borrow bit opr operand (one or two bytes) ccr condition code register pc program counter dd direct address of operand pch program counter high byte dd rr direct address of operand and relative offset of branch instruction pcl program counter low byte dd direct to direct addressing mode rel relative addressing mode dir direct addressing mode rel relative program counter offset byte dix+ direct to indexed with post increment addressing mode rr relative program counter offset byte ee ff high and low bytes of offset in indexed, 16-bit offset addressing sp1 stack pointer, 8-bit offset addressing mode ext extended addressing mode sp2 stack pointer 16-bit offset addressing mode ff offset byte in indexed, 8-bit offset addressing sp stack pointer h half-carry bit u unde?ed h index register high byte v over?w bit hh ll high and low bytes of operand address in extended addressing x index register low byte i interrupt mask z zero bit ii immediate operand byte & logical and imd immediate source to direct destination addressing mode | logical or imm immediate addressing mode logical exclusive or inh inherent addressing mode ( ) contents of ix indexed, no offset addressing mode ? ) negation (twos complement) ix+ indexed, no offset, post increment addressing mode # immediate value ix+d indexed with post increment to direct addressing mode sign extend ix1 indexed, 8-bit offset addressing mode loaded with ix1+ indexed, 8-bit offset, post increment addressing mode ? if ix2 indexed, 16-bit offset addressing mode : concatenated with m memory location ? set or cleared n negative bit not affected table 5-1. instruction set summary (continued) source form operation description effect on ccr address mode opcode operand cycles vh i nzc f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola central processor unit (cpu) 81 central processor unit (cpu) opcode map non-disclosure agreement required table 5-2. opcode map bit manipulation branch read-modify-write control register/memory dir dir rel dir inh inh ix1 sp1 ix inh inh imm dir ext ix2 sp2 ix1 sp1 ix 0 1234569e6789 abcd9ede9eef 0 5 brset0 3 dir 4 bset0 2 dir 3 bra 2 rel 4 neg 2 dir 1 nega 1 inh 1 negx 1 inh 4 neg 2 ix1 5 neg 3 sp1 3 neg 1ix 7 rti 1 inh 3 bge 2 rel 2 sub 2 imm 3 sub 2 dir 4 sub 3 ext 4 sub 3 ix2 5 sub 4 sp2 3 sub 2 ix1 4 sub 3 sp1 2 sub 1ix 1 5 brclr0 3 dir 4 bclr0 2 dir 3 brn 2 rel 5 cbeq 3 dir 4 cbeqa 3 imm 4 cbeqx 3 imm 5 cbeq 3 ix1+ 6 cbeq 4 sp1 4 cbeq 2 ix+ 4 rts 1 inh 3 blt 2 rel 2 cmp 2 imm 3 cmp 2 dir 4 cmp 3 ext 4 cmp 3 ix2 5 cmp 4 sp2 3 cmp 2 ix1 4 cmp 3 sp1 2 cmp 1ix 2 5 brset1 3 dir 4 bset1 2 dir 3 bhi 2 rel 5 mul 1 inh 7 div 1 inh 3 nsa 1 inh 2 daa 1 inh 3 bgt 2 rel 2 sbc 2 imm 3 sbc 2 dir 4 sbc 3 ext 4 sbc 3 ix2 5 sbc 4 sp2 3 sbc 2 ix1 4 sbc 3 sp1 2 sbc 1ix 3 5 brclr1 3 dir 4 bclr1 2 dir 3 bls 2 rel 4 com 2 dir 1 coma 1 inh 1 comx 1 inh 4 com 2 ix1 5 com 3 sp1 3 com 1ix 9 swi 1 inh 3 ble 2 rel 2 cpx 2 imm 3 cpx 2 dir 4 cpx 3 ext 4 cpx 3 ix2 5 cpx 4 sp2 3 cpx 2 ix1 4 cpx 3 sp1 2 cpx 1ix 4 5 brset2 3 dir 4 bset2 2 dir 3 bcc 2 rel 4 lsr 2 dir 1 lsra 1 inh 1 lsrx 1 inh 4 lsr 2 ix1 5 lsr 3 sp1 3 lsr 1ix 2 ta p 1 inh 2 txs 1 inh 2 and 2 imm 3 and 2 dir 4 and 3 ext 4 and 3 ix2 5 and 4 sp2 3 and 2 ix1 4 and 3 sp1 2 and 1ix 5 5 brclr2 3 dir 4 bclr2 2 dir 3 bcs 2 rel 4 sthx 2 dir 3 ldhx 3 imm 4 ldhx 2 dir 3 cphx 3 imm 4 cphx 2 dir 1 tpa 1 inh 2 tsx 1 inh 2 bit 2 imm 3 bit 2 dir 4 bit 3 ext 4 bit 3 ix2 5 bit 4 sp2 3 bit 2 ix1 4 bit 3 sp1 2 bit 1ix 6 5 brset3 3 dir 4 bset3 2 dir 3 bne 2 rel 4 ror 2 dir 1 rora 1 inh 1 rorx 1 inh 4 ror 2 ix1 5 ror 3 sp1 3 ror 1ix 2 pula 1 inh 2 lda 2 imm 3 lda 2 dir 4 lda 3 ext 4 lda 3 ix2 5 lda 4 sp2 3 lda 2 ix1 4 lda 3 sp1 2 lda 1ix 7 5 brclr3 3 dir 4 bclr3 2 dir 3 beq 2 rel 4 asr 2 dir 1 asra 1 inh 1 asrx 1 inh 4 asr 2 ix1 5 asr 3 sp1 3 asr 1ix 2 psha 1 inh 1 ta x 1 inh 2 ais 2 imm 3 sta 2 dir 4 sta 3 ext 4 sta 3 ix2 5 sta 4 sp2 3 sta 2 ix1 4 sta 3 sp1 2 sta 1ix 8 5 brset4 3 dir 4 bset4 2 dir 3 bhcc 2 rel 4 lsl 2 dir 1 lsla 1 inh 1 lslx 1 inh 4 lsl 2 ix1 5 lsl 3 sp1 3 lsl 1ix 2 pulx 1 inh 1 clc 1 inh 2 eor 2 imm 3 eor 2 dir 4 eor 3 ext 4 eor 3 ix2 5 eor 4 sp2 3 eor 2 ix1 4 eor 3 sp1 2 eor 1ix 9 5 brclr4 3 dir 4 bclr4 2 dir 3 bhcs 2 rel 4 rol 2 dir 1 rola 1 inh 1 rolx 1 inh 4 rol 2 ix1 5 rol 3 sp1 3 rol 1ix 2 pshx 1 inh 1 sec 1 inh 2 adc 2 imm 3 adc 2 dir 4 adc 3 ext 4 adc 3 ix2 5 adc 4 sp2 3 adc 2 ix1 4 adc 3 sp1 2 adc 1ix a 5 brset5 3 dir 4 bset5 2 dir 3 bpl 2 rel 4 dec 2 dir 1 deca 1 inh 1 decx 1 inh 4 dec 2 ix1 5 dec 3 sp1 3 dec 1ix 2 pulh 1 inh 2 cli 1 inh 2 ora 2 imm 3 ora 2 dir 4 ora 3 ext 4 ora 3 ix2 5 ora 4 sp2 3 ora 2 ix1 4 ora 3 sp1 2 ora 1ix b 5 brclr5 3 dir 4 bclr5 2 dir 3 bmi 2 rel 5 dbnz 3 dir 3 dbnza 2 inh 3 dbnzx 2 inh 5 dbnz 3 ix1 6 dbnz 4 sp1 4 dbnz 2ix 2 pshh 1 inh 2 sei 1 inh 2 add 2 imm 3 add 2 dir 4 add 3 ext 4 add 3 ix2 5 add 4 sp2 3 add 2 ix1 4 add 3 sp1 2 add 1ix c 5 brset6 3 dir 4 bset6 2 dir 3 bmc 2 rel 4 inc 2 dir 1 inca 1 inh 1 incx 1 inh 4 inc 2 ix1 5 inc 3 sp1 3 inc 1ix 1 clrh 1 inh 1 rsp 1 inh 2 jmp 2 dir 3 jmp 3 ext 4 jmp 3 ix2 3 jmp 2 ix1 2 jmp 1ix d 5 brclr6 3 dir 4 bclr6 2 dir 3 bms 2 rel 3 tst 2 dir 1 tsta 1 inh 1 tstx 1 inh 3 tst 2 ix1 4 tst 3 sp1 2 tst 1ix 1 nop 1 inh 4 bsr 2 rel 4 jsr 2 dir 5 jsr 3 ext 6 jsr 3 ix2 5 jsr 2 ix1 4 jsr 1ix e 5 brset7 3 dir 4 bset7 2 dir 3 bil 2 rel 5 mov 3dd 4 mov 2 dix+ 4 mov 3 imd 4 mov 2 ix+d 1 stop 1 inh * 2 ldx 2 imm 3 ldx 2 dir 4 ldx 3 ext 4 ldx 3 ix2 5 ldx 4 sp2 3 ldx 2 ix1 4 ldx 3 sp1 2 ldx 1ix f 5 brclr7 3 dir 4 bclr7 2 dir 3 bih 2 rel 3 clr 2 dir 1 clra 1 inh 1 clrx 1 inh 3 clr 2 ix1 4 clr 3 sp1 2 clr 1ix 1 wait 1 inh 1 txa 1 inh 2 aix 2 imm 3 stx 2 dir 4 stx 3 ext 4 stx 3 ix2 5 stx 4 sp2 3 stx 2 ix1 4 stx 3 sp1 2 stx 1ix inh inherent rel relative sp1 stack pointer, 8-bit offset imm immediate ix indexed, no offset sp2 stack pointer, 16-bit offset dir direct ix1 indexed, 8-bit offset ix+ indexed, no offset with ext extended ix2 indexed, 16-bit offset post increment dd direct-direct imd immediate-direct ix1+ indexed, 1-byte offset with ix+d indexed-direct dix+ direct-indexed post increment * pre-byte for stack pointer indexed instructions 0 high byte of opcode in hexadecimal low byte of opcode in hexadecimal 0 5 brset0 3 dir cycles opcode mnemonic number of bytes / addressing mode msb lsb msb lsb f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required central processor unit (cpu) advance information mc68hc(9)08lk60 rev. 1.0 82 central processor unit (cpu) motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 83 non-disclosure agreement required advance information mc68hc(9)08lk60 section 6. system integration module (sim) 6.1 contents 6.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84 6.3 sim bus clock control and generation . . . . . . . . . . . . . . . . . .87 6.3.1 bus timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 6.3.2 clock startup from por or lvi reset. . . . . . . . . . . . . . . . .87 6.3.3 clocks in stop mode and wait mode . . . . . . . . . . . . . . . . .88 6.4 reset and system initialization. . . . . . . . . . . . . . . . . . . . . . . . .88 6.4.1 external pin reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 6.4.2 active resets from internal sources . . . . . . . . . . . . . . . . . .90 6.4.2.1 power-on reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91 6.4.2.2 computer operating properly (cop) reset. . . . . . . . . . .92 6.4.2.3 illegal opcode reset . . . . . . . . . . . . . . . . . . . . . . . . . . . .92 6.4.2.4 illegal address reset . . . . . . . . . . . . . . . . . . . . . . . . . . . .93 6.4.2.5 low-voltage inhibit (lvi) reset . . . . . . . . . . . . . . . . . . . .93 6.5 sim counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93 6.5.1 sim counter during power-on reset . . . . . . . . . . . . . . . . .93 6.5.2 sim counter during stop mode recovery . . . . . . . . . . . . .94 6.5.3 sim counter and reset states . . . . . . . . . . . . . . . . . . . . . .94 6.6 exception control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94 6.6.1 interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 6.6.1.1 hardware interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97 6.6.1.2 swi instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 6.6.2 reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 6.6.3 break interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 6.6.4 status flag protection in break mode. . . . . . . . . . . . . . . . .99 6.7 low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100 6.7.1 wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100 6.7.2 stop mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 84 system integration module (sim) motorola 6.8 sim registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103 6.8.1 sim break status register . . . . . . . . . . . . . . . . . . . . . . . .103 6.8.2 sim reset status register . . . . . . . . . . . . . . . . . . . . . . . .105 6.8.3 sim break flag control register . . . . . . . . . . . . . . . . . . .106 6.2 introduction this section describes the system integration module (sim24, version c), which supports up to 24 external and/or internal interrupts. together with the cpu, the sim controls all mcu activities. a block diagram of the sim is shown in figure 6-1 . figure 6-2 is a summary of the sim i/o (input/output) registers. the sim is a system state controller that coordinates cpu and exception timing. the sim is responsible for: bus clock generation and control for cpu and peripherals: stop/wait/reset/break entry and recovery internal clock control master reset control, including power-on reset (por) and cop timeout interrupt control: acknowledge timing arbitration control timing vector address generation cpu enable/disable timing modular architecture expandable to 128 interrupt sources note: all references to lvi and dma and stop mode operation in this section should be ignored. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system integration module (sim) introduction mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 85 non-disclosure agreement required figure 6-1. sim block diagram stop/wait clock control clock generators por control reset pin control sim reset status register interrupt control and priority decode module stop module wait cpu stop; from cpu cpu wait; from cpu simoscen; to cgm cgmout; from cgm internal clocks master reset control reset pin logic lvi; from lvi module illegal opcode; from cpu illegal address; from address map decoders cop; from cop module interrupt sources cpu interface reset control sim counter cop clock cgmxclk; from cgm 2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 86 system integration module (sim) motorola table 6-1 shows the internal signal names used in this section. addr. register name bit 7 654321 bit 0 $fe00 sim break status register (sbsr) read: rrrrrr sbsw r write: note 1 reset: 0 $fe01 sim reset status register (srsr) read: por pin cop ilop ilad 0 lvi 0 write: reset: 1 0000000 $fe03 sim break flag control register (sbfcr) read: bcfe rrrrrrr write: reset: 0 note 1. writing a logic 0 clears sbsw. r = reserved = unimplemented figure 6-2. sim i/o register summary table 6-1. signal name conventions signal name description cgmxclk buffered version of osc1 from clock generator module (cgm) cgmvclk pll output cgmout pll-based or osc1-based clock output from cgm module (bus clock = cgmout divided by two) iab internal address bus idb internal data bus porrst signal from the power-on reset module to the sim irst internal reset signal r/ w read/write signal f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system integration module (sim) sim bus clock control and generation mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 87 non-disclosure agreement required 6.3 sim bus clock control and generation the bus clock generator provides system clock signals for the cpu and peripherals on the mcu. the system clocks are generated from an incoming clock, cgmout, as shown in figure 6-3 . this clock can come from either an external oscillator or from the on-chip pll. (see 7.2 introduction .) 6.3.1 bus timing in user mode , the internal bus frequency is either the crystal oscillator output (cgmxclk) divided by four or the pll output (cgmvclk) divided by four. (see 7.2 introduction .) 6.3.2 clock startup from por or lvi reset when the power-on reset module or the low-voltage inhibit module generates a reset, the clocks to the cpu and peripherals are inactive and held in an inactive phase until after the 4096 cgmxclk cycle por timeout has completed. the rst pin is driven low by the sim during this entire period. the ibus clocks start upon completion of the timeout. note: the mc68hc(9)08lk60 does not have an lvi module. figure 6-3. cgm clock signals pll osc1 cgmxclk 2 bus clock generators sim cgm sim counter ptc3 monitor mode clock select circuit cgmvclk bcs 2 a b s* cgmout *when s = 1, cgmout = b user mode f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 88 system integration module (sim) motorola 6.3.3 clocks in stop mode and wait mode upon exit from stop mode (by an interrupt, break, or reset), the sim allows cgmxclk to clock the sim counter. the cpu and peripheral clocks do not become active until after the stop delay timeout. this timeout is selectable as 4096 or 32 cgmxclk cycles. (see 6.7.2 stop mode .) note: the mc68hc(9)08lk60 does not allow stop mode operation. in wait mode, the cpu clocks are inactive. the sim also produces two sets of clocks for other modules. refer to the wait mode subsection of each module to see if the module is active or inactive in wait mode. some modules can be programmed to be active in wait mode. 6.4 reset and system initialization the mcu has these reset sources: power-on reset module (por) external reset pin ( rst) computer operating properly module (cop) low-voltage inhibit module (lvi) illegal opcode illegal address all of these resets produce the vector $fffe?fff ($fefe?eff in monitor mode) and assert the internal reset signal (irst). irst causes all registers to be returned to their default values and all modules to be returned to their reset states. an internal reset clears the sim counter (see 6.5 sim counter ), but an external reset does not. each of the resets sets a corresponding bit in the sim reset status register (srsr). (see 6.8 sim registers .) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system integration module (sim) reset and system initialization mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 89 non-disclosure agreement required 6.4.1 external pin reset pulling the asynchronous rst pin low halts all processing. the pin bit of the sim reset status register (srsr) is set as long as rst is held low for a minimum of 67 cgmxclk cycles, assuming that neither the por nor the lvi was the source of the reset. see table 6-2 for details. figure 6-4 shows the relative timing. figure 6-4. external reset timing table 6-2. pin bit set timing reset type number of cycles required to set pin por/lvi 4163 (4096 + 64 + 3) all others 67 (64 + 3) rst iab pc vect h vect l cgmout f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 90 system integration module (sim) motorola 6.4.2 active resets from internal sources all internal reset sources actively pull the rst pin low for 32 cgmxclk cycles to allow resetting of external peripherals. the internal reset signal irst continues to be asserted for an additional 32 cycles. (see figure 6-5 .) an internal reset can be caused by an illegal address, illegal opcode, cop timeout, lvi, or por. (see figure 6-6 .) note that for lvi or por resets, the sim cycles through 4096 cgmxclk cycles during which the sim forces the rst pin low. the internal reset signal then follows the sequence from the falling edge of rst shown in figure 6-5 . figure 6-5. internal reset timing the cop reset is asynchronous to the bus clock. figure 6-6. sources of internal reset the active reset feature allows the part to issue a reset to peripherals and other chips within a system built around the mcu. irst rst rst pulled low by mcu iab 32 cycles 32 cycles vector high cgmxclk illegal address rst illegal opcode rst coprst lvi por internal reset f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system integration module (sim) reset and system initialization mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 91 non-disclosure agreement required 6.4.2.1 power-on reset when power is first applied to the mcu, the power-on reset module (por) generates a pulse to indicate that power-on has occurred. the external reset pin ( rst) is held low while the sim counter counts out 4096 cgmxclk cycles. sixty-four cgmxclk cycles later, the cpu and memories are released from reset to allow the reset vector sequence to occur. at power-on, these events occur: a por pulse is generated. the internal reset signal is asserted. the sim enables cgmout. internal clocks to the cpu and modules are held inactive for 4096 cgmxclk cycles to allow stabilization of the oscillator. the rst pin is driven low during the oscillator stabilization time. the por bit of the sim reset status register (srsr) is set and all other bits in the register are cleared. figure 6-7. por recovery porrst osc1 cgmxclk cgmout rst iab 4096 cycles 32 cycles 32 cycles $fffe $ffff f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 92 system integration module (sim) motorola 6.4.2.2 computer operating properly (cop) reset an input to the sim is reserved for the cop reset signal. the overflow of the cop counter causes an internal reset and sets the cop bit in the sim reset status register (srsr). the sim actively pulls down the rst pin for all internal reset sources. to prevent a cop module timeout, write any value to location $ffff. writing to location $ffff clears the cop counter and bits 12 through 4 of the sim counter. the sim counter output, which occurs at least every 2 13 ? 4 cgmxclk cycles, drives the cop counter. the cop should be serviced as soon as possible out of reset to guarantee the maximum amount of time before the first timeout. the cop module is disabled if the rst pin or the irq1 pin is held at v dd +v hi while the mcu is in monitor mode. the cop module can be disabled only through combinational logic conditioned with the high voltage signal on the rst or the irq1 pin. this prevents the cop from becoming disabled as a result of external noise. during a break state, v dd +v hi on the rst pin disables the cop module. 6.4.2.3 illegal opcode reset the sim decodes signals from the cpu to detect illegal instructions. an illegal instruction sets the ilop bit in the sim reset status register (srsr) and causes a reset. if the stop enable bit, stop, in the mask option register is logic 0, the sim treats the stop instruction as an illegal opcode and causes an illegal opcode reset. the sim actively pulls down the rst pin for all internal reset sources. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system integration module (sim) sim counter mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 93 non-disclosure agreement required 6.4.2.4 illegal address reset an opcode fetch from an unmapped address generates an illegal address reset. the sim verifies that the cpu is fetching an opcode prior to asserting the ilad bit in the sim reset status register (srsr) and resetting the mcu. a data fetch from an unmapped address does not generate a reset. the sim actively pulls down the rst pin for all internal reset sources. 6.4.2.5 low-voltage inhibit (lvi) reset the low-voltage inhibit module (lvi) asserts its output to the sim when the v dd voltage falls to the lvi tripf voltage. the lvi bit in the sim reset status register (srsr) is set, and the external reset pin ( rst) is held low while the sim counter counts out 4096 cgmxclk cycles. sixty-four cgmxclk cycles later, the cpu is released from reset to allow the reset vector sequence to occur. the sim actively pulls down the rst pin for all internal reset sources. note: the mc68hc(9)08lk60 does not have an lvi module. 6.5 sim counter the sim counter is used by the power-on reset module (por) and in stop mode recovery to allow the oscillator time to stabilize before enabling the internal bus (ibus) clocks. the sim counter also serves as a prescaler for the computer operating properly module (cop). the sim counter overflow supplies the clock for the cop module. the sim counter is 13 bits long and is clocked by the falling edge of cgmxclk. 6.5.1 sim counter during power-on reset the power-on reset module (por) detects power applied to the mcu. at power-on, the por circuit asserts the signal porrst. once the sim is initialized, it enables the clock generation module (cgm) to drive the bus clock state machine. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 94 system integration module (sim) motorola 6.5.2 sim counter during stop mode recovery the sim counter also is used for stop mode recovery. the stop instruction clears the sim counter. after an interrupt, break, or reset, the sim senses the state of the short stop recovery bit, ssrec, in the mask option register. if the ssrec bit is a logic 1, then the stop recovery is reduced from the normal delay of 4096 cgmxclk cycles down to 32 cgmxclk cycles. this is ideal for applications using canned oscillators that do not require long startup times from stop mode. external crystal applications should use the full stop recovery time, that is, with ssrec cleared. note: the mc68hc(9)08lk60 does not allow stop mode operation. 6.5.3 sim counter and reset states external reset has no effect on the sim counter. (see 6.7.2 stop mode for details.) the sim counter is free-running after all reset states. (see 6.4.2 active resets from internal sources for counter control and internal reset recovery sequences.) 6.6 exception control normal, sequential program execution can be changed in three different ways: interrupts: maskable hardware cpu interrupts non-maskable software interrupt instruction (swi) reset break interrupts f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system integration module (sim) exception control mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 95 non-disclosure agreement required 6.6.1 interrupts at the beginning of an interrupt, the cpu saves the cpu register contents on the stack and sets the interrupt mask (i bit) to prevent additional interrupts. at the end of an interrupt, the rti instruction recovers the cpu register contents from the stack so that normal processing can resume. figure 6-8 shows interrupt entry timing. figure 6-10 shows interrupt recovery timing. interrupts are latched, and arbitration is performed in the sim at the start of interrupt processing. the arbitration result is a constant that the cpu uses to determine which vector to fetch. once an interrupt is latched by the sim, no other interrupt may take precedence, regardless of priority, until the latched interrupt is serviced (or the i bit is cleared). (see figure 6-9 .) figure 6-8 . interrupt entry module idb r/ w interrupt dummy sp sp ?1 sp ?2 sp ?3 sp ?4 vect h vect l start addr iab dummy pc 1[7:0] pc 1[15:8] x a ccr v data h v data l opcode i bit f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 96 system integration module (sim) motorola figure 6-9. interrupt processing no no no yes no no yes no yes yes as many interrupts i bit set? from reset break interrupt? i bit set? irq0 interrupt? irq1 interrupt? swi instruction? rti instruction? fetch next instruction unstack cpu registers stack cpu registers set i bit load pc with interrupt vector execute instruction yes yes as exist on the chip f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system integration module (sim) exception control mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 97 non-disclosure agreement required figure 6-10. interrupt recovery 6.6.1.1 hardware interrupts a hardware interrupt does not stop the current instruction. processing of a hardware interrupt begins after completion of the current instruction. when the current instruction is complete, the sim checks all pending hardware interrupts. if interrupts are not masked (i bit clear in the condition code register), and if the corresponding interrupt enable bit is set, the sim proceeds with interrupt processing; otherwise, the next instruction is fetched and executed. if more than one interrupt is pending at the end of an instruction execution, the highest priority interrupt is serviced first. figure 6-11 demonstrates what happens when two interrupts are pending. if an interrupt is pending upon exit from the original interrupt service routine, the pending interrupt is serviced before the lda instruction is executed. module idb r/ w interrupt sp ?4 sp ?3 sp ?2 sp ?1 sp pc pc + 1 iab ccr a x pc ?1[7:0] pc 1[15:8] opcode operand i bit f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 98 system integration module (sim) motorola figure 6-11 . interrupt recognition example the lda opcode is prefetched by both the int1 and int2 rti instructions. however, in the case of the int1 rti prefetch, this is a redundant operation. note: to maintain compatibility with the m6805 family, the h register is not pushed on the stack during interrupt entry. if the interrupt service routine modifies the h register or uses the indexed addressing mode, software should save the h register and then restore it prior to exiting the routine. 6.6.1.2 swi instruction the swi instruction is a non-maskable instruction that causes an interrupt regardless of the state of the interrupt mask (i bit) in the condition code register. note: a software interrupt pushes pc onto the stack. a software interrupt does not push pc ?1, as a hardware interrupt does. cli lda int1 pulh rti int2 background #$ff pshh int1 interrupt service routine pulh rti pshh int2 interrupt service routine routine f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system integration module (sim) exception control mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 99 non-disclosure agreement required 6.6.2 reset all reset sources always have equal and highest priority and cannot be arbitrated. 6.6.3 break interrupts the break module can stop normal program flow at a software- programmable break point by asserting its break interrupt output. (see section 9. break module .) the sim puts the cpu into the break state by forcing it to the swi vector location. refer to the break interrupt subsection of each module to see how each module is affected by the break state. 6.6.4 status flag protection in break mode the sim controls whether status flags contained in other modules can be cleared during break mode. the user can select whether flags are protected from being cleared by properly initializing the break clear flag enable bit (bcfe) in the sim break flag control register (sbfcr). protecting flags in break mode ensures that set flags will not be cleared while in break mode. this protection allows registers to be freely read and written during break mode without losing status flag information. setting the bcfe bit enables the clearing mechanisms. once cleared in break mode, a flag remains cleared even when break mode is exited. status flags with a 2-step clearing mechanism for example, a read of one register followed by the read or write of another ?are protected, even when the first step is accomplished prior to entering break mode. upon leaving break mode, execution of the second step will clear the flag as normal. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 100 system integration module (sim) motorola 6.7 low-power modes executing the wait or stop instruction puts the mcu in a low-power- consumption mode for standby situations. the sim holds the cpu in a non-clocked state. the operation of each of these modes is described in the following paragraphs. both stop and wait clear the interrupt mask (i) in the condition code register, allowing interrupts to occur. note: the mc68hc(9)08lk60 does not allow stop mode operation. 6.7.1 wait mode in wait mode, the cpu clocks are inactive while the peripheral clocks continue to run. figure 6-12 shows the timing for wait mode entry. a module that is active during wait mode can wake up the cpu with an interrupt if the interrupt is enabled. stacking for the interrupt begins one cycle after the wait instruction during which the interrupt occurred. in wait mode, the cpu clocks are inactive. refer to the wait mode subsection of each module to see if the module is active or inactive in wait mode. some modules can be programmed to be active in wait mode. wait mode also can be exited by a reset or break. a break interrupt during wait mode sets the sim break stop/wait bit, sbsw, in the sim break status register (sbsr). if the cop disable bit, copd, in the mask option register is logic 0, then the computer operating properly module (cop) is enabled and remains active in wait mode. figure 6-12. wait mode entry timing wait addr + 1 same same iab idb previous data next opcode same wait addr same r/ w note: previous data can be operand data or the wait opcode, depending on the last instruction. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system integration module (sim) low-power modes mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 101 non-disclosure agreement required figure 6-13 and figure 6-14 show the timing for wait recovery. figure 6-13. wait recovery from interrupt or break figure 6-14. wait recovery from internal reset 6.7.2 stop mode note: the mc68hc(9)08lk60 does not allow stop mode operation. in stop mode, the sim counter is reset and the system clocks are disabled. an interrupt request from a module can cause an exit from stop mode. stacking for interrupts begins after the selected stop recovery time has elapsed. reset or break also causes an exit from stop mode. the sim disables the clock generator module outputs (cgmout and cgmxclk) in stop mode, stopping the cpu and peripherals. stop recovery time is selectable using the ssrec bit in the mask option register (mor). if ssrec is set, stop recovery is reduced from the normal delay of 4096 cgmxclk cycles down to 32. this is ideal for $6e0c $6e0b $00ff $00fe $00fd $00fc $a6 $a6 $01 $0b $6e $a6 iab idb exitstopwait note: exitstopwait = rst pin or cpu interrupt or break interrupt iab idb rst $a6 $a6 $6e0b rst vct h rst vct l $a6 cgmxclk 32 cycles 32 cycles f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 102 system integration module (sim) motorola applications using canned oscillators that do not require long startup times from stop mode. note: external crystal applications should use the full stop recovery time by clearing the ssrec bit. a break interrupt during stop mode sets the sim break stop/wait bit (sbsw) in the sim break status register (sbsr). the sim counter is held in reset from the execution of the stop instruction until the beginning of stop recovery. it is then used to time the recovery period. figure 6-15 shows stop mode entry timing. figure 6-15. stop mode entry timing figure 6-16. stop mode recovery from interrupt or break stop addr + 1 same same iab idb previous data next opcode same stop addr same r/ w cpustop note: previous data can be operand data or the stop opcode, depending on the last instruction. cgmxclk int/break iab stop + 2 stop + 2 sp sp ?1 sp ?2 sp ?3 stop +1 stop recovery period f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system integration module (sim) sim registers mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 103 non-disclosure agreement required 6.8 sim registers the sim has three memory mapped registers. table 6-3 shows the mapping of these registers. 6.8.1 sim break status register the sim break status register contains a flag to indicate that a break caused an exit from stop or wait mode. sbsw ?sim break stop/wait bit this status bit is useful in applications requiring a return to wait or stop mode after exiting from a break interrupt. clear sbsw by writing a logic 0 to it. reset clears sbsw. 1 = stop mode or wait mode was exited by break interrupt. 0 = stop mode or wait mode was not exited by break interrupt. table 6-3. sim registers address register access mode $fe00 sbsr ?sim break status register user $fe01 srsr ?sim reset status register user $fe03 sbfcr ?sim break ?g control register user address: $fe00 bit 7 654321 bit 0 read: rrrrrr sbsw r write: note (1) reset: 0 r = reserved 1. writing a logic 0 clears sbsw. figure 6-17. sim break status register (sbsr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 104 system integration module (sim) motorola sbsw can be read within the break state swi routine. the user can modify the return address on the stack by subtracting one from it. the following code is an example of this. writing 0 to the sbsw bit clears it. ; ; ; this code works if the h register has been pushed onto the stack in the break service routine software. this code should be executed at the end of the break service routine software. hibyte equ 5 lobyte equ 6 ; if not sbsw, do rti brclr sbsw,sbsr, return ; ; see if wait mode or stop mode was exited by break. tst lobyte,sp ; if returnlo is not zero, bne dolo ; then just decrement low byte. dec hibyte,sp ; else deal with high byte, too. dolo dec lobyte,sp ; point to wait/stop opcode. return pulh rti ; restore h register. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system integration module (sim) sim registers mc68hc(9)08lk60 rev. 1.0 advance information motorola system integration module (sim) 105 non-disclosure agreement required 6.8.2 sim reset status register this register contains six flags that show the source of the last reset. clear the sim reset status register by reading it. a power-on reset sets the por bit and clears all other bits in the register. por ?power-on reset bit 1 = last reset caused by por circuit 0 = read of srsr pin external reset bit 1 = last reset caused by external reset pin ( rst) 0 = por or read of srsr cop ?computer operating properly reset bit 1 = last reset caused by cop counter 0 = por or read of srsr ilop ?illegal opcode reset bit 1 = last reset caused by an illegal opcode 0 = por or read of srsr ilad ?illegal address reset bit (opcode fetches only) 1 = last reset caused by an opcode fetch from an illegal address 0 = por or read of srsr lvi ?low-voltage inhibit reset bit 1 = last reset caused by the lvi circuit 0 = por or read of srsr address: $fe01 bit 7 654321 bit 0 read: por pin cop ilop ilad 0 lvi 0 write: por: 10000000 = unimplemented figure 6-18. sim reset status register (srsr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required system integration module (sim) advance information mc68hc(9)08lk60 rev. 1.0 106 system integration module (sim) motorola 6.8.3 sim break flag control register the sim break control register contains a bit that enables software to clear status bits while the mcu is in a break state. bcfe ?break clear flag enable bit this read/write bit enables software to clear status bits by accessing status registers while the mcu is in a break state. to clear status bits during the break state, the bcfe bit must be set. 1 = status bits clearable during break 0 = status bits not clearable during break address: $fe03 bit 7 654321 bit 0 read: bcfe rrrrrrr write: reset: 0 r = reserved figure 6-19. sim break flag control register (sbfcr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 107 non-disclosure agreement required advance information mc68hc(9)08lk60 section 7. clock generator module (cgmb) 7.1 contents 7.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108 7.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109 7.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109 7.4.1 crystal oscillator circuit . . . . . . . . . . . . . . . . . . . . . . . . . .111 7.4.2 phase-locked loop circuit (pll) . . . . . . . . . . . . . . . . . . .111 7.4.2.1 pll circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 7.4.2.2 acquisition and tracking modes . . . . . . . . . . . . . . . . . .113 7.4.2.3 manual and automatic pll bandwidth modes . . . . . . .113 7.4.2.4 programming the pll . . . . . . . . . . . . . . . . . . . . . . . . . .115 7.4.2.5 special programming exceptions . . . . . . . . . . . . . . . . .118 7.4.3 base clock selector circuit. . . . . . . . . . . . . . . . . . . . . . . .118 7.4.4 cgmb external connections . . . . . . . . . . . . . . . . . . . . . .119 7.5 i/o signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 7.5.1 crystal amplifier input pin (osc1) . . . . . . . . . . . . . . . . . .120 7.5.2 crystal amplifier output pin (osc2) . . . . . . . . . . . . . . . . .120 7.5.3 external filter capacitor pin (cgmxfc). . . . . . . . . . . . . .120 7.5.4 pll analog power pin (v dda ) . . . . . . . . . . . . . . . . . . . . .121 7.5.5 pll analog ground pin (v ssa ) . . . . . . . . . . . . . . . . . . . . .121 7.5.6 oscillator enable signal (simoscen) . . . . . . . . . . . . . . .121 7.5.7 crystal output frequency signal (cgmxclk) . . . . . . . . .121 7.5.8 cgmb base clock output (cgmout) . . . . . . . . . . . . . . .122 7.5.9 cgmb cpu interrupt (cgmint) . . . . . . . . . . . . . . . . . . . .122 7.6 cgmb registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122 7.6.1 pll control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124 7.6.2 pll bandwidth control register . . . . . . . . . . . . . . . . . . .126 7.6.3 pll multiplier select register high. . . . . . . . . . . . . . . . . .128 7.6.4 pll multiplier select register low . . . . . . . . . . . . . . . . . .129 7.6.5 pll vco range select register . . . . . . . . . . . . . . . . . . .130 7.6.6 pll reference divider select register. . . . . . . . . . . . . . .131 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 108 clock generator module (cgmb) motorola 7.7 interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132 7.8 wait mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132 7.9 cgmb during break interrupts. . . . . . . . . . . . . . . . . . . . . . . .133 7.10 acquisition/lock time specifications . . . . . . . . . . . . . . . . . . .133 7.10.1 acquisition/lock time definitions . . . . . . . . . . . . . . . . . . .133 7.10.2 parametric influences on reaction time . . . . . . . . . . . . .135 7.10.3 choosing a filter capacitor. . . . . . . . . . . . . . . . . . . . . . . .136 7.10.4 reaction time calculation . . . . . . . . . . . . . . . . . . . . . . . .137 7.2 introduction this section describes the clock generator module (cgm, version b). the cgm generates the crystal clock signal, cgmxclk, which operates at the frequency of the crystal. the cgm also generates the base clock signal, cgmout, from which the system integration module (sim) derives the system clocks. cgmout is based on either the crystal clock divided by two or the phase-locked loop (pll) clock, cgmvclk, divided by two. the pll is a fully functional frequency generator designed for use with crystals or ceramic resonators. the pll can generate a 4-mhz bus frequency without using a 16-mhz crystal. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) features mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 109 non-disclosure agreement required 7.3 features features of the cgmb include: phase-locked loop with output frequency in integer multiples of an integer dividend of the crystal reference low-frequency crystal operation with low-power operation and high-output frequency resolution programmable reference divider for even greater resolution programmable prescaler for power-of-two increases in frequency programmable hardware voltage-controlled oscillator (vco) for low-jitter operation automatic bandwidth control mode for low-jitter operation automatic frequency lock detector cpu interrupt on entry or exit from locked condition 7.4 functional description the cgmb consists of three major submodules: crystal oscillator circuit ?the crystal oscillator circuit generates the constant crystal frequency clock, cgmxclk. phase-locked loop (pll) ?the pll generates the programmable vco frequency clock, cgmvclk. base clock selector circuit ?this software-controlled circuit selects either cgmxclk divided by two or the vco clock, cgmvclk, divided by two as the base clock, cgmout. the sim derives the system clocks from cgmout. figure 7-1 shows the structure of the cgm. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 110 clock generator module (cgmb) motorola figure 7-1. cgmb block diagram bcs phase detector loop filter frequency divider voltage controlled oscillator automatic mode control lock detector clock cgmxclk cgmout cgmvdv cgmvclk simoscen crystal oscillator interrupt control cgmint cgmrdv pll analog 2 cgmrclk osc2 osc1 select circuit v dda cgmxfc v ssa lock auto acq vpr[1:0] pllie pllf mul[11:0] reference divider rds[3:0] vrs[7:0] frequency divider pre[1:0] f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 111 non-disclosure agreement required 7.4.1 crystal oscillator circuit the crystal oscillator circuit consists of an inverting amplifier and an external crystal. the osc1 pin is the input to the amplifier and the osc2 pin is the output. the simoscen signal from the system integration module (sim) enables the crystal oscillator circuit. the cgmxclk signal is the output of the crystal oscillator circuit and runs at a rate equal to the crystal frequency. cgmxclk is then buffered to produce cgmrclk, the pll reference clock. cgmxclk can be used by other modules which require precise timing for operation. the duty cycle of cgmxclk is not guaranteed to be 50% and depends on external factors, including the crystal and related external components. an externally generated clock also can feed the osc1 pin of the crystal oscillator circuit. connect the external clock to the osc1 pin and let the osc2 pin float. 7.4.2 phase-locked loop circuit (pll) the pll is a frequency generator that can operate in either acquisition mode or tracking mode, depending on the accuracy of the output frequency. the pll can change between acquisition and tracking modes either automatically or manually. 7.4.2.1 pll circuits the pll consists of: voltage-controlled oscillator (vco) reference divider frequency prescaler modulo vco frequency divider phase detector loop filter lock detector f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 112 clock generator module (cgmb) motorola the operating range of the vco is programmable for a wide range of frequencies and for maximum immunity to external noise, including supply and cgmxfc noise. the vco frequency is bound to a range from roughly one-half to twice the center-of-range frequency, f vrs . modulating the voltage on the cgmxfc pin changes the frequency within this range. by design, f vrs is equal to the nominal center-of-range frequency, f nom , (38.4 khz) times a linear factor, l, and a power-of-two factor, e, or (l 2 e )f nom . cgmrclk is the pll reference clock, a buffered version of cgmxclk. cgmrclk runs at a frequency, f rclk , and is fed to the pll through a programmable modulo reference divider, which divides f rclk by a factor r. this feature allows frequency steps of higher resolution. the divider? output is the final reference clock, cgmrdv, running at a frequency f rdv =f rclk /r. the vco? output clock, cgmvclk, running at a frequency f vclk , is fed back through a programmable prescale divider and a programmable modulo divider. the prescaler divides the vco clock by a power-of-two factor, p, and the modulo divider reduces the vco clock by a factor, n. the divider? output is the vco feedback clock, cgmvdv, running at a frequency f vdv =f vclk /(n 2 p ). (see 7.4.2.4 programming the pll for more information.) the phase detector then compares the vco feedback clock, cgmvdv, with the final reference clock, cgmrdv. a correction pulse is generated based on the phase difference between the two signals. the loop filter then slightly alters the dc voltage on the external capacitor connected to cgmxfc based on the width and direction of the correction pulse. the filter can make fast or slow corrections depending on its mode, described in 7.4.2.2 acquisition and tracking modes . the value of the external capacitor and the reference frequency determines the speed of the corrections and the stability of the pll. the lock detector compares the frequencies of the vco feedback clock, cgmvdv, and the final reference clock, cgmrdv. therefore, the speed of the lock detector is directly proportional to the final reference frequency f rdv . the circuit determines the mode of the pll and the lock condition based on this comparison. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 113 non-disclosure agreement required 7.4.2.2 acquisition and tracking modes the pll filter is manually or automatically configurable into one of two operating modes: acquisition mode in acquisition mode, the filter can make large frequency corrections to the vco. this mode is used at pll start- up or when the pll has suffered a severe noise hit and the vco frequency is far off the desired frequency. when in acquisition mode, the acq bit is clear in the pll bandwidth control register. (see 7.6.2 pll bandwidth control register .) tracking mode ?in tracking mode, the filter makes only small corrections to the frequency of the vco. pll jitter is much lower in tracking mode, but the response to noise is also slower. the pll enters tracking mode when the vco frequency is nearly correct, such as when the pll is selected as the base clock source. (see 7.4.3 base clock selector circuit .) the pll is in tracking mode automatically when not in acquisition mode or when the acq bit is set. 7.4.2.3 manual and automatic pll bandwidth modes the pll can change the bandwidth or operational mode of the loop filter manually or automatically. in automatic bandwidth control mode (auto = 1), the lock detector automatically switches between acquisition and tracking modes. automatic bandwidth control mode also is used to determine when the vco clock, cgmvclk, is safe to use as the source for the base clock, cgmout. (see 7.6.2 pll bandwidth control register .) if pll interrupts are enabled, the software can wait for a pll interrupt request and then check the lock bit. if interrupts are disabled, software can poll the lock bit continuously (during pll startup, usually) or at periodic intervals. in either case, when the lock bit is set, the vco clock is safe to use as the source for the base clock. (see 7.4.3 base clock selector circuit .) if the vco is selected as the source for the base clock and the lock bit is clear, the pll has suffered a severe noise hit and the software must take appropriate action, depending on the application. (see 7.7 interrupts for information and precautions on using interrupts.) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 114 clock generator module (cgmb) motorola these conditions apply when the pll is in automatic bandwidth control mode: the acq bit (see 7.6.2 pll bandwidth control register ) is a read-only indicator of the mode of the filter. (see 7.4.2.2 acquisition and tracking modes .) the acq bit is set when the vco frequency is within a certain tolerance, ? trk , and is cleared when the vco frequency is out of a certain tolerance, ? unt . (see 7.10 acquisition/lock time specifications for more information.) the lock bit is a read-only indicator of the locked state of the pll. the lock bit is set when the vco frequency is within a certain tolerance, ? lock , and is cleared when the vco frequency is out of a certain tolerance, ? unl . (see 7.10 acquisition/lock time specifications for more information.) cpu interrupts can occur if enabled (pllie = 1) when the pll? lock condition changes, toggling the lock bit. (see 7.6.1 pll control register .) the pll also may operate in manual mode (auto = 0). manual mode is used by systems that do not require an indicator of the lock condition for proper operation. such systems typically operate well below f busmax and require fast startup. these conditions apply when in manual mode: acq is a writable control bit that controls the mode of the filter. before turning on the pll in manual mode, the acq bit must be clear. before entering tracking mode ( acq = 1), software must wait a given time, t acq (see 7.10 acquisition/lock time specifications ), after turning on the pll by setting pllon in the pll control register (pctl). software must wait a given time, t al , after entering tracking mode before selecting the pll as the clock source to cgmout (bcs = 1). the lock bit is disabled. cpu interrupts from the cgmb are disabled. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 115 non-disclosure agreement required 7.4.2.4 programming the pll this procedure shows how to program the pll. note: the round function in the following equations means that the real number should be rounded to the nearest integer number. 1. choose the desired bus frequency, f busdes . 2. calculate the desired vco frequency (four times the desired bus frequency). 3. choose a practical pll reference frequency, f rclk . 4. select the prescaler power-of-two multiplier, p. 5. select the reference divider based on the resolution desired. for maximum resolution, use the formula below. however, higher degrees of resolution slow down the final reference frequency, which may cause acquisition time to increase and may affect the value of the external capacitor. for more information, see 7.10 acquisition/lock time specifications . select a vco frequency multiplier, n. f vclkdes 4f busdes = p integer 2 pmax f vclkdes f vclkmax ----------------------------------------------------------- - ?? ?? ?? ?? log 2 () log ------------------------------------------------------------------------- - 1 + = r round r max f vclkdes 2 p f rclk -------------------------------- ?? ?? ?? ?? integer f vclkdes 2 p f rclk -------------------------------- ?? ?? ?? ?? ?? ?? ?? ?? ?? = n round rf vclkdes 2 p f rclk ------------------------------------------ ?? ?? ?? ?? = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 116 clock generator module (cgmb) motorola 6. for fastest acquisition time, reduce n/r until r is the smallest value possible. for example, if n = 6 and r = 4, n reduces to 3 and r reduces to 2. 7. calculate and verify the adequacy of the vco and bus frequencies f vclk and f bus . 8. select the vco? power-of-two range multiplier, e. higher values of e should be used at higher frequencies. select a vco linear range multiplier, l, where f nom = 38.4 khz 9. calculate and verify the adequacy of the vco programmed center-of-range frequency f vrs . f vrs = (l 2 e )f nom 10. verify the choice of p, r, n, e, and l by comparing f vclk to f vrs and f vclkdes . for proper operation, f vclk must be within the application? tolerance of f vclkdes , and f vrs must be as close as possible to f vclk . note: exceeding the recommended maximum bus frequency or vco frequency can crash the mcu. f vclk nf rclk = f vclk 2 p nr ? () f rclk = f bus f vclk () 4 ? = e integer 2 emax f vclk f vrsmax ---------------------------------------------- ?? ?? ?? ?? log 2 () log ------------------------------------------------------------ 1 + = l round f vclk 2 e f nom ----------------------------- - ?? ?? ?? ?? = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 117 non-disclosure agreement required 11. program the pll registers accordingly: a. in the pre bits of the pll control register, program the binary equivalent of p. b. in the vpr bits of the pll control register, program the binary equivalent of e. c. in the pll multiplier select register low and the pll multiplier select register high, program the binary equivalent of n. d. in the pll vco range select register, program the binary coded equivalent of l. e. in the pll reference divider select register, program the binary coded equivalent of r. refer to table 7-1 for a numeric example with numbers in hexadecimal notation. note: the numeric examples given in table 7-1 assume a crystal frequency of 38.4 khz. table 7-1. numeric example of pll register programming bus frequency e p n l r 307,200 hz 1 1 10 10 1 614,400 hz 1 1 20 20 1 652,800 hz 2 2 11 11 1 691,200 hz 2 2 12 12 1 729,600 hz 2 2 13 13 1 768,000 hz 2 2 14 14 1 806,400 hz 2 2 15 15 1 998,400 hz 2 2 1a 1a 1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 118 clock generator module (cgmb) motorola 7.4.2.5 special programming exceptions the programming method described in 7.4.2.4 programming the pll does not account for three possible exceptions. a value of 0 for r, n, or l is meaningless when used in the equations given. to account for these exceptions: a 0 value for r or n is interpreted exactly the same as a value of one at the minimum frequency and the vco range power-of-two bits. a 0 value for l disables the pll and prevents its selection as the source for the base clock. (see 7.4.3 base clock selector circuit .) 7.4.3 base clock selector circuit this circuit is used to select either the crystal clock, cgmxclk, or the vco clock, cgmvclk, as the source of the base clock, cgmout. the two input clocks go through a transition control circuit that waits up to three cgmxclk cycles and three cgmvclk cycles to change from one clock source to the other. during this time, cgmout is held in stasis. the output of the transition control circuit is then divided by two to correct the duty cycle. therefore, the bus clock frequency, which is one-half of the base clock frequency, is one-fourth the frequency of the selected clock (cgmxclk or cgmvclk). the bcs bit in the pll control register (pctl) selects which clock drives cgmout. the vco clock cannot be selected as the base clock source if the pll is not turned on. the pll cannot be turned off if the vco clock is selected. the pll cannot be turned on or off simultaneously with the selection or deselection of the vco clock. the vco clock also cannot be selected as the base clock source if the factor l is programmed to a 0. this value would set up a condition inconsistent with the operation of the pll, so that the pll would be disabled and the crystal clock would be forced as the source of the base clock. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 119 non-disclosure agreement required 7.4.4 cgmb external connections in its typical configuration, the cgmb requires seven external components. five of these are for the crystal oscillator and two are for the pll. the crystal oscillator normally is connected in a pierce oscillator configuration, as shown in figure 7-2 . figure 7-2 shows only the logical representation of the internal components and may not represent actual circuitry. the oscillator configuration uses five components: crystal, x 1 fixed capacitor, c 1 tuning capacitor, c 2 (can also be a fixed capacitor) feedback resistor, r b series resistor, r s (optional) the series resistor (r s ) is included in the diagram to follow strict pierce oscillator guidelines and may not be required for all ranges of operation, especially with high frequency crystals. refer to the crystal manufacturer? data for more information. figure 7-2 also shows the external components for the pll: bypass capacitor, c byp filter capacitor, c f routing should be done with great care to minimize signal cross talk and noise. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 120 clock generator module (cgmb) motorola figure 7-2. cgmb external connections 7.5 i/o signals this section describes the cgmb input/output (i/o) signals. 7.5.1 crystal amplifier input pin (osc1) the osc1 pin is an input to the crystal oscillator amplifier. 7.5.2 crystal amplifier output pin (osc2) the osc2 pin is the output of the crystal oscillator inverting amplifier. 7.5.3 external filter capacitor pin (cgmxfc) the cgmxfc pin is required by the loop filter to filter out phase corrections. a small external capacitor is connected to this pin. c 1 c 2 c f simoscen cgmxclk r b x 1 r s * c byp osc1 osc2 v ss cgmxfc v dda *r s can be 0 (shorted) when used with higher-frequency crystals. refer to manufacturer? data. v dd f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) i/o signals mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 121 non-disclosure agreement required note: to prevent noise problems, c f should be placed as close to the cgmxfc pin as possible, with minimum routing distances and no routing of other signals across the c f connection. 7.5.4 pll analog power pin (v dda ) v dda is a power pin used by the analog portions of the pll. connect the v dda pin to the same voltage potential as the v dd pin. note: route v dda carefully for maximum noise immunity and place bypass capacitors as close as possible to the package. 7.5.5 pll analog ground pin (v ssa ) v ssa is a ground pin used by the analog portions of the pll. connect the v ssa pin to the same voltage potential as the v ss pin. note: route v ssa carefully for maximum noise immunity and place bypass capacitors as close as possible to the package. 7.5.6 oscillator enable signal (simoscen) the simoscen signal comes from the system integration module (sim) and enables the oscillator and pll. 7.5.7 crystal output frequency signal (cgmxclk) cgmxclk is the crystal oscillator output signal. it runs at the full speed of the crystal (f xclk ) and comes directly from the crystal oscillator circuit. figure 7-2 shows only the logical relation of cgmxclk to osc1 and osc2 and may not represent the actual circuitry. the duty cycle of cgmxclk is unknown and may depend on the crystal and other external factors. also, the frequency and amplitude of cgmxclk can be unstable at startup. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 122 clock generator module (cgmb) motorola 7.5.8 cgmb base clock output (cgmout) cgmout is the clock output of the cgmb. this signal goes to the sim, which generates the mcu clocks. cgmout is a 50% duty cycle clock running at twice the bus frequency. cgmout is software programmable to be either the oscillator output, cgmxclk, divided by two or the vco clock, cgmvclk, divided by two. 7.5.9 cgmb cpu interrupt (cgmint) cgmint is the interrupt signal generated by the pll lock detector. 7.6 cgmb registers these registers control and monitor operation of the cgmb: pll control register (see 7.6.1 pll control register ) pll bandwidth control register (see 7.6.2 pll bandwidth control register ) pll multiplier select register high (see 7.6.3 pll multiplier select register high ) pll multiplier select register low (see 7.6.4 pll multiplier select register low ) pll vco range select register (see 7.6.5 pll vco range select register ) pll reference divider select register (see 7.6.6 pll reference divider select register ) figure 7-3 provides a summary of the cgmb registers. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) cgmb registers mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 123 non-disclosure agreement required addr. name bit 7 6 5 4 3 2 1 bit 0 $0007 pll control register (pctl) read: pllie pllf pllon bcs pre1 pre0 vpr1 vpr0 write: reset: 0 0 1 0 1111 $0008 pll bandwidth control register (pbwc) read: auto lock a cq 0000 r write: reset: 0 0 0 0 0000 $0009 pll multiplier select register high (pmsh) read: 0 0 0 0 mul11 mul10 mul9 mul8 write: reset: 0 0 0 0 0000 $000a pll multiplier select register low (pmsl) read: mul7 mul6 mul5 mul4 mul3 mul2 mul1 mul0 write: reset: 0 1 0 0 0000 $000b pll vco range select register (pvrs) read: vrs7 vrs6 vrs5 vrs4 vrs3 vrs2 vrs1 vrs0 write: reset: 0 1 0 0 0000 $000c pll reference divider select register (prds) read: 0 0 0 0 rds3 rds2 rds1 rds0 write: reset: 0 0 0 0 0001 = unimplemented r = reserved figure 7-3. cgmb i/o register summary f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 124 clock generator module (cgmb) motorola 7.6.1 pll control register the pll control register (pctl) contains the interrupt enable and flag bits, the on/off switch, the base clock selector bit, the prescaler bits, and the vco power of two range selector bits. pllie ?pll interrupt enable bit this read/write bit enables the pll to generate an interrupt request when the lock bit toggles, setting the pll flag, pllf. when the auto bit in the pll bandwidth control register (pbwc) is clear, pllie cannot be written and reads as logic 0. reset clears the pllie bit. 1 = pll interrupts enabled 0 = pll interrupts disabled pllf ?pll interrupt flag bit this read-only bit is set whenever the lock bit toggles. pllf generates an interrupt request if the pllie bit also is set. pllf always reads as logic 0 when the auto bit in the pll bandwidth control register (pbwc) is clear. clear the pllf bit by reading the pll control register. reset clears the pllf bit. 1 = change in lock condition 0 = no change in lock condition note: do not inadvertently clear the pllf bit. any read or read-modify-write operation on the pll control register clears the pllf bit. address: $0007 bit 7 654321 bit 0 read: pllie pllf pllon bcs pre1 pre0 vpr1 vpr0 write: reset: 00101111 = unimplemented figure 7-4. pll control register (pctl) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) cgmb registers mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 125 non-disclosure agreement required pllon ?pll on bit this read/write bit activates the pll and enables the vco clock, cgmvclk. pllon cannot be cleared if the vco clock is driving the base clock, cgmout (bcs = 1). (see 7.4.3 base clock selector circuit .) reset sets this bit so that the loop can stabilize as the mcu is powering up. 1 = pll on 0 = pll off bcs ?base clock select bit this read/write bit selects either the crystal oscillator output, cgmxclk, or the vco clock, cgmvclk, as the source of the cgm output, cgmout. cgmout frequency is one-half the frequency of the selected clock. bcs cannot be set while the pllon bit is clear. after toggling bcs, it may take up to three cgmxclk and three cgmvclk cycles to complete the transition from one source clock to the other. during the transition, cgmout is held in stasis. (see 7.4.3 base clock selector circuit .) reset clears the bcs bit. 1 = cgmvclk divided by two drives cgmout 0 = cgmxclk divided by two drives cgmout note: pllon and bcs have built-in protection that prevents the base clock selector circuit from selecting the vco clock as the source of the base clock if the pll is off. therefore, pllon cannot be cleared when bcs is set, and bcs cannot be set when pllon is clear. if the pll is off (pllon = 0), selecting cgmvclk requires two writes to the pll control register. (see 7.4.3 base clock selector circuit .) pre1 and pre0 ?prescaler program bits these read/write bits control a prescaler that selects the prescaler power-of-two multiplier, p. (see 7.4.2.1 pll circuits and 7.4.2.4 programming the pll .) pre1 and pre0 cannot be written when the pllon bit is set. reset clears these bits. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 126 clock generator module (cgmb) motorola vpr1 and vpr0 ?vco power-of-two range select bits these read/write bits control the vco? hardware power-of-two range multiplier, e, that, in conjunction with l (see 7.4.2.1 pll circuits , 7.4.2.4 programming the pll , and 7.6.5 pll vco range select register .) controls the hardware center-of-range frequency, f vrs . vpr1 and vpr0 cannot be written when the pllon bit is set. reset clears these bits. 7.6.2 pll bandwidth control register the pll bandwidth control register (pbwc): selects automatic or manual (software-controlled) bandwidth control mode indicates when the pll is locked in automatic bandwidth control mode, indicates when the pll is in acquisition or tracking mode in manual operation, forces the pll into acquisition or tracking mode table 7-2. pre1 and pre0 programming pre1 and pre0 p prescaler multiplier 00 0 1 01 1 2 10 2 4 11 3 8 table 7-3. vpr1 and vpr0 programming vpr1 and vpr0 e vco power-of-two range multiplier 00 0 1 01 1 2 10 2 4 11 3 8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) cgmb registers mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 127 non-disclosure agreement required auto ?automatic bandwidth control bit this read/write bit selects automatic or manual bandwidth control. when initializing the pll for manual operation (auto = 0), clear the acq bit before turning on the pll. reset clears the auto bit. 1 = automatic bandwidth control 0 = manual bandwidth control lock ?lock indicator bit when the auto bit is set, lock is a read-only bit that becomes set when the vco clock, cgmvclk, is locked (running at the programmed frequency). when the auto bit is clear, lock reads as logic 0 and has no meaning. note: the write function of this bit is reserved for test, so this bit must always be written a 0. reset clears the lock bit. 1 = vco frequency correct or locked 0 = vco frequency incorrect or unlocked acq acquisition mode bit when the auto bit is set, acq is a read-only bit that indicates whether the pll is in acquisition mode or tracking mode. when the auto bit is clear, acq is a read/write bit that controls whether the pll is in acquisition or tracking mode. address: $0008 bit 7 654321 bit 0 read: auto lock a cq 0000 r write: reset: 00000000 = unimplemented r = reserved figure 7-5. pll bandwidth control register (pbwc) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 128 clock generator module (cgmb) motorola in automatic bandwidth control mode (auto = 1), the last-written value from manual operation is stored in a temporary location and is recovered when manual operation resumes. reset clears this bit, enabling acquisition mode. 1 = tracking mode 0 = acquisition mode 7.6.3 pll multiplier select register high the pll multiplier select register high (pmsh) contains the programming information for the high byte of the modulo feedback divider. mul11?ul8 ?multiplier select bits these read/write bits control the high byte of the modulo feedback divider that selects the vco frequency multiplier n. (see 7.4.2.1 pll circuits and 7.4.2.4 programming the pll .) a value of $0000 in the multiplier select registers configures the modulo feedback divider the same as a value of $0001. reset initializes the registers to $0040, for a default multiply value of 64. note: the multiplier select bits have built-in protection such that they cannot be written when the pll is on (pllon = 1). address: $0009 bit 7 654321 bit 0 read: 0000 mul11 mul10 mul9 mul8 write: reset: 00000000 = unimplemented figure 7-6. pll multiplier select register high (pmsh) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) cgmb registers mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 129 non-disclosure agreement required 7.6.4 pll multiplier select register low the pll multiplier select register (pmsl) low contains the programming information for the low byte of the modulo feedback divider. mul7?ul0 ?multiplier select bits these read/write bits control the low byte of the modulo feedback divider that selects the vco frequency multiplier, n. (see 7.4.2.1 pll circuits and 7.4.2.4 programming the pll .) mul7?ul0 cannot be written when the pllon bit in the pctl is set. a value of $0000 in the multiplier select registers configures the modulo feedback divider the same as a value of $0001. reset initializes the register to $40, for a default multiply value of 64. note: the multiplier select bits have built-in protection such that they cannot be written when the pll is on (pllon = 1). address: $000a bit 7 654321 bit 0 read: mul7 mul6 mul5 mul4 mul3 mul2 mul1 mul0 write: reset: 01000000 figure 7-7. pll multiplier select register low (pmsl) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 130 clock generator module (cgmb) motorola 7.6.5 pll vco range select register the pll vco range select register (pvrs) contains the programming information required for the hardware configuration of the vco. vrs7?rs0 ?vco range select bits these read/write bits control the hardware center-of-range linear multiplier l which, in conjunction with e (see 7.4.2.1 pll circuits , 7.4.2.4 programming the pll , and 7.6.1 pll control register ), controls the hardware center-of-range frequency, f vrs . vrs7?rs0 cannot be written when the pllon bit in the pctl is set (see 7.4.2.5 special programming exceptions ). a value of $00 in the vco range select register disables the pll and clears the bcs bit in the pll control register. (see 7.4.3 base clock selector circuit and 7.4.2.5 special programming exceptions .) reset initializes the register to $40 for a default range multiply value of 64. note: the vco range select bits have built-in protection such that they cannot be written when the pll is on (pllon = 1) and such that the vco clock cannot be selected as the source of the base clock (bcs = 1) if the vco range select bits are all clear. the pll vco range select register must be programmed correctly. incorrect programming may result in failure of the pll to achieve lock. address: $000b bit 7 654321 bit 0 read: vrs7 vrs6 vrs5 vrs4 vrs3 vrs2 vrs1 vrs0 write: reset: 01000000 figure 7-8. pll vco range select register (pvrs) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) cgmb registers mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 131 non-disclosure agreement required 7.6.6 pll reference divider select register the pll reference divider select register (prds) contains the programming information for the modulo reference divider. rds3?ds0 ?reference divider select bits these read/write bits control the modulo reference divider that selects the reference division factor r. (see 7.4.2.1 pll circuits and 7.4.2.4 programming the pll .) rds7?ds0 cannot be written when the pllon bit in the pctl is set. a value of $00 in the reference divider select register configures the reference divider the same as a value of $01. (see 7.4.2.5 special programming exceptions .) reset initializes the register to $01, for a default divide value of 1. note: the reference divider select bits have built-in protection such that they cannot be written when the pll is on (pllon = 1). address: $000c bit 7 654321 bit 0 read: 0000 rds3 rds2 rds1 rds0 write: reset: 00000000 = unimplemented figure 7-9. pll reference divider select register (prds) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 132 clock generator module (cgmb) motorola 7.7 interrupts when the auto bit is set in the pll bandwidth control register (pbwc), the pll can generate a cpu interrupt request every time the lock bit changes state. the pllie bit in the pll control register (pctl) enables cpu interrupts from the pll. pllf, the interrupt flag in the pctl, becomes set whether interrupts are enabled or not. when the auto bit is clear, cpu interrupts from the pll are disabled and pllf reads as logic 0. software should read the lock bit after a pll interrupt request to see if the request was due to an entry into lock or an exit from lock. when the pll enters lock, the vco clock, cgmvclk, divided by two can be selected as the cgmout source by setting bcs in the pctl. when the pll exits lock, the vco clock frequency is corrupt, and appropriate precautions should be taken. if the application is not frequency- sensitive, interrupts should be disabled to prevent pll interrupt service routines from impeding software performance or from exceeding stack limitations. note: software can select the cgmvclk divided by two as the cgmout source even if the pll is not locked (lock = 0). therefore, software should make sure the pll is locked before setting the bcs bit. 7.8 wait mode the wait instruction put the mcu in low power-consumption standby mode. the wait instruction does not affect the cgmb. before entering wait mode, software can disengage and turn off the pll by clearing the bcs and pllon bits in the pll control register (pctl). less power-sensitive applications can disengage the pll without turning it off. applications that require the pll to wake the mcu from wait mode also can deselect the pll output without turning off the pll. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) cgmb during break interrupts mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 133 non-disclosure agreement required 7.9 cgmb during break interrupts the system integration module (sim) controls whether status bits in other modules can be cleared during the break state. the bcfe bit in the sim break flag control register (sbfcr) enables software to clear status bits during the break state. (see 6.8.3 sim break flag control register .) to allow software to clear status bits during a break interrupt, write a logic 1 to the bcfe bit. if a status bit is cleared during the break state, it remains cleared when the mcu exits the break state. to protect the pllf bit during the break state, write a logic 0 to the bcfe bit. with bcfe at logic 0 (its default state), software can read and write the pll control register during the break state without affecting the pllf bit. 7.10 acquisition/lock time specifications the acquisition and lock times of the pll are, in many applications, the most critical pll design parameters. proper design and use of the pll ensures the highest stability and lowest acquisition/lock times. 7.10.1 acquisition/lock time definitions typical control systems refer to the acquisition time or lock time as the reaction time, within specified tolerances, of the system to a step input. in a pll, the step input occurs when the pll is turned on or when it suffers a noise hit. the tolerance is usually specified as a percent of the step input or when the output settles to the desired value plus or minus a percent of the frequency change. therefore, the reaction time is constant in this definition, regardless of the size of the step input. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 134 clock generator module (cgmb) motorola for example, consider a system with a 5% acquisition time tolerance. if a command instructs the system to change from 0 hz to 1 mhz, the acquisition time is the time taken for the frequency to reach 1 mhz 50 khz. fifty khz = 5% of the 1-mhz step input. or, if the system is operating at 1 mhz and suffers a ?00 khz noise hit, the acquisition time is the time taken to return from 900 khz to 1 mhz 5 khz. five khz = 5% of the 100-khz step input. other systems refer to acquisition and lock times as the time the system takes to reduce the error between the actual output and the desired output to within specified tolerances. therefore, the acquisition or lock time varies according to the original error in the output. minor errors may not even be registered. typical pll applications prefer to use this definition because the system requires the output frequency to be within a certain tolerance of the desired frequency regardless of the size of the initial error. the discrepancy in these definitions makes it difficult to specify an acquisition or lock time for a typical pll. therefore, the definitions for acquisition and lock times for this module are as follows: acquisition time, t acq , is the time the pll takes to reduce the error between the actual output frequency and the desired output frequency to less than the tracking mode entry tolerance, ? trk . acquisition time is based on an initial frequency error, (f des f orig )/f des , of not more than 100%. in automatic bandwidth control mode (see 7.4.2.3 manual and automatic pll bandwidth modes ), acquisition time expires when the acq bit becomes set in the pll bandwidth control register (pbwc). lock time, t lock , is the time the pll takes to reduce the error between the actual output frequency and the desired output frequency to less than the lock mode entry tolerance, ? lock . lock time is based on an initial frequency error, (f des ?f orig )/f des , of not more than 100%. in automatic bandwidth control mode, lock time expires when the lock bit becomes set in the pll bandwidth control register (pbwc). (see 7.4.2.3 manual and automatic pll bandwidth modes .) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) acquisition/lock time specifications mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 135 non-disclosure agreement required obviously, the acquisition and lock times can vary according to how large the frequency error is and may be shorter or longer in many cases. 7.10.2 parametric influences on reaction time acquisition and lock times are designed to be as short as possible while still providing the highest possible stability. these reaction times are not constant, however. many factors directly and indirectly affect the acquisition time. the most critical parameter which affects the reaction times of the pll is the reference frequency, f rdv . this frequency is the input to the phase detector and controls how often the pll makes corrections. for stability, the corrections must be small compared to the desired frequency, so several corrections are required to reduce the frequency error. therefore, the slower the reference the longer it takes to make these corrections. this parameter is also under user control via the choice of crystal frequency f xclk and the r value programmed in the reference divider. (see 7.4.2.1 pll circuits , 7.4.2.4 programming the pll , and 7.6.6 pll reference divider select register ). another critical parameter is the external filter capacitor. the pll modifies the voltage on the vco by adding or subtracting charge from this capacitor. therefore, the rate at which the voltage changes for a given frequency error (thus change in charge) is proportional to the capacitor size. the size of the capacitor also is related to the stability of the pll. if the capacitor is too small, the pll cannot make small enough adjustments to the voltage and the system cannot lock. if the capacitor is too large, the pll may not be able to adjust the voltage in a reasonable time. (see 7.10.3 choosing a filter capacitor .) also important is the operating voltage potential applied to v dda . the power supply potential alters the characteristics of the pll. a fixed value is best. variable supplies, such as batteries, are acceptable if they vary within a known range at very slow speeds. noise on the power supply is not acceptable, because it causes small frequency errors which continually change the acquisition time of the pll. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 136 clock generator module (cgmb) motorola temperature and processing also can affect acquisition time because the electrical characteristics of the pll change. the part operates as specified as long as these influences stay within the specified limits. external factors, however, can cause drastic changes in the operation of the pll. these factors include noise injected into the pll through the filter capacitor, filter capacitor leakage, stray impedances on the circuit board, and even humidity or circuit board contamination. 7.10.3 choosing a filter capacitor as described in 7.10.2 parametric influences on reaction time , the external filter capacitor, c f , is critical to the stability and reaction time of the pll. the pll also is dependent on reference frequency and supply voltage. the value of the capacitor must, therefore, be chosen with supply potential and reference frequency in mind. for proper operation, the external filter capacitor must be chosen according to this equation: for acceptable values of c fact , see 7.10 acquisition/lock time specifications . for the value of v dda , choose the voltage potential at which the mcu is operating. if the power supply is variable, choose a value near the middle of the range of possible supply values. this equation does not always yield a commonly available capacitor size, so round to the nearest available size. if the value is between two different sizes, choose the higher value for better stability. choosing the lower size may seem attractive for acquisition time improvement, but the pll may become unstable. also, always choose a capacitor with a tight tolerance ( 20% or better) and low dissipation. c f c fact v dda f rdv ----------------- ?? ?? ?? = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
clock generator module (cgmb) acquisition/lock time specifications mc68hc(9)08lk60 rev. 1.0 advance information motorola clock generator module (cgmb) 137 non-disclosure agreement required 7.10.4 reaction time calculation the actual acquisition and lock times can be calculated using the equations here. these equations yield nominal values under the following conditions: correct selection of filter capacitor, c f (see 7.10.3 choosing a filter capacitor ) room temperature operation negligible external leakage on cgmxfc negligible noise the k factor in the equations is derived from internal pll parameters. k acq is the k factor when the pll is configured in acquisition mode, and k trk is the k factor when the pll is configured in tracking mode. (see 7.4.2.2 acquisition and tracking modes .) note: the inverse proportionality between the lock time and the reference frequency. in automatic bandwidth control mode, the acquisition and lock times are quantized into units based on the reference frequency. (see 7.4.2.3 manual and automatic pll bandwidth modes .) a certain number of clock cycles, n acq , is required to ascertain that the pll is within the tracking mode entry tolerance, ? trk , before exiting acquisition mode. a certain number of clock cycles, n trk , is required to ascertain that the pll is within the lock mode entry tolerance, ? lock . therefore, the acquisition time, t acq , is an integer multiple of n acq /f rdv , and the acquisition to lock time, t al , is an integer multiple of n trk /f rdv . also, since the average frequency over the entire measurement period must be within the specified tolerance, the total time usually is longer than t lock as calculated above. t acq v dda f rdv ----------------- ?? ?? ?? 8 k acq ----------------- ?? ?? = t al v dda f rdv ----------------- ?? ?? ?? 4 k trk ---------------- ?? ?? = t lock t acq t al + = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required clock generator module (cgmb) advance information mc68hc(9)08lk60 rev. 1.0 138 clock generator module (cgmb) motorola in manual mode, it is usually necessary to wait considerably longer than t lock before selecting the pll clock (see 7.4.3 base clock selector circuit ), because the factors described in 7.10.2 parametric influences on reaction time may slow the lock time considerably. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola functional controller module (fcm) 139 non-disclosure agreement required advance information mc68hc(9)08lk60 section 8. functional controller module (fcm) 8.1 contents 8.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140 8.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140 8.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140 8.5 module description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 8.5.1 timebase submodule . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 8.5.2 real-time clock submodule. . . . . . . . . . . . . . . . . . . . . . .143 8.5.3 cop watchdog timer submodule . . . . . . . . . . . . . . . . . .144 8.6 interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 8.7 i/o signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 8.8 interrupt signals (fcm, cpu, and irq) . . . . . . . . . . . . . . . . .145 8.9 functional controller registers . . . . . . . . . . . . . . . . . . . . . . .146 8.9.1 timebase control register . . . . . . . . . . . . . . . . . . . . . . . .147 8.9.2 rtc control register . . . . . . . . . . . . . . . . . . . . . . . . . . . .150 8.9.3 rtc status register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152 8.9.4 chronograph data register . . . . . . . . . . . . . . . . . . . . . . .154 8.9.5 seconds data register . . . . . . . . . . . . . . . . . . . . . . . . . . .154 8.9.6 minutes data register. . . . . . . . . . . . . . . . . . . . . . . . . . . .155 8.9.7 hours data register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155 8.9.8 alarm minutes register . . . . . . . . . . . . . . . . . . . . . . . . . . .156 8.9.9 alarm hours register . . . . . . . . . . . . . . . . . . . . . . . . . . . .156 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required functional controller module (fcm) advance information mc68hc(9)08lk60 rev. 1.0 140 functional controller module (fcm) motorola 8.2 introduction the fcm provides timekeeping functions and the software computer operating properly (cop) mechanism. 8.3 features features of the fcm include: real-time clock with seconds, minutes, and hours counters software chronograph counter watchdog timer alarm clock with interrupts 8.4 functional description the functional controller module (fcm) includes several of the functional controller circuits traditionally designed into custom mcus for paging applications. this module is specifically targeted for use with the hc08 cpu. the circuits included are: real-time clock (rtc) interrupts with chronograph register watchdog timer, also called the computer operating properly (cop) timer time base circuit which supports 32.000-khz and 38.400-khz crystal oscillators in addition to these two crystal options, a provision to use a crystal with a frequency two times these frequencies has been created. this was designed specifically for use with a 76.8-khz crystal oscillator. this module provides nine registers for software control. the clock source of the rtc interrupts and status registers are synchronized to the bus timing to ensure synchronous register access. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
functional controller module (fcm) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola functional controller module (fcm) 141 non-disclosure agreement required figure 8-1. functional controller block diagram t12 and t23 reset timebase system address/data bus /control signals interrupt interface to sim 1000 hz cgmxclk timebase buffers timer watchdog to sim 2000 hz; to lcd reset control register chrono clock system chrono data register seconds data register minutes data counter and alarm register hours data counter and alarm register rtc control register rtc status register f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required functional controller module (fcm) advance information mc68hc(9)08lk60 rev. 1.0 142 functional controller module (fcm) motorola figure 8-2. real-time clock system block diagram chronograph data register rtc interrupt chronograph interrupt 10 hz 100 hz 1 hz to interrupt logic from timebase circuit 10 hz mux 2 hz 4 hz rtc control register rtc hours counter rtc minutes counter rtc seconds counter 1 hz 1 / 60 hz 1 / 3600 hz interrupt enable enable 1 hour interrupt enable rtc hours alarm rtc minutes alarm 1 minute 1 sec irq f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
functional controller module (fcm) module description mc68hc(9)08lk60 rev. 1.0 advance information motorola functional controller module (fcm) 143 non-disclosure agreement required 8.5 module description the functional controller module is an hc08-compatible module designed for use in paging applications. it connects to the hc08 internal bus and communicates to the hc08 cpu by way of the address bus, data bus, and control signals. the crystal oscillator signal (cgmxclk) enters the module and connects to the timebase circuit. the timebase creates clock signals which feed the real-time clock. 8.5.1 timebase submodule the timebase submodule is designed to create timing signals equivalent to any binary division of the crystal oscillator frequency. clock signals created at frequencies of 1 hz, 2 hz, and 4 hz are fed to the real-time clock (rtc) submodule. when a frequency of 4 hz is selected, the frequency will vary from 5 hz to 3.3 hz with an average of 4 hz. the timebase circuit also generates a 100-hz clock signal which is fed to the rtc to produce a software chronograph function. in addition, two signals (1 khz and 2 khz) are created for use by other mcu modules. software selectable options are available to support the use of a 32.000-khz or 38.400-khz crystal oscillator. the default option is for 38.400 khz. 8.5.2 real-time clock submodule the rtc module consists of the rtc control register, the chronograph data register, the hours, minutes, and seconds registers for timekeeping, and the hours and minutes alarm registers. the real-time clock (rtc) system will provide a periodic interrupt to the cpu of 1 hour, 1 minute, 1 second, 1 hz, 2 hz, or 4 hz for software timekeeping functions and an interrupt with 10 hz resolution which can be used to generate chronometer functions in software. when a a periodic interrupt of 4 hz is selected, the periodic interrupt will vary from 5 hz to 3.3 hz with an average of 4 hz. the chronograph data register can be cleared using the chrc bit in the timebase control register. see figure 8-4 . the timebase counter can also be cleared by setting the tbclr in the timebase control register. see figure 8-4 . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required functional controller module (fcm) advance information mc68hc(9)08lk60 rev. 1.0 144 functional controller module (fcm) motorola note: this section assumes that a 32.000-khz oscillator or a 38.400-khz oscillator is used, according to the software option selected. these crystals will generate precise interrupts. crystals of a frequency two times these frequencies can also be used to generate accurate rtc clock control. any other oscillator frequency will not provide accurate 100 hz and 1 hz counters. 8.5.3 cop watchdog timer submodule the computer operating properly (cop) or watchdog timer subsystem is a software selectable feature which will generate a system reset if not serviced within the specified watchdog timeout period. the watchdog timer counter chain is derived from an output of the timebase circuit. this input signal is divided to give the watchdog timer reset rate selected by the first write to the cop select bits in the timebase control register. a watchdog timer reset is performed by writing any data to address $ffff. this will reset the counter chain and begin the timeout countdown again. the watchdog timer counter chain is also cleared when the mcu is in reset. the value of the two watchdog timer rate select bits in the timebase control register (tbcr) determines the watchdog timer timeout rate. these bits can be written only on the first write to this register after a reset. if these bits are never written to, the watchdog timer reset rate will be set at 1 second when a 32-khz crystal is used (see table 8-1 ). note: although these bits default to 0, the user should write to these bits to prevent subsequent writes from changing the timeout rate. a bit set/clear for any bit in this register is executed as a read-modify-write of this register. if used as the first write to this register, further writes to crs[1:0] would not be valid, and the default value would still be set. the cpu clock halts during wait mode, but the oscillator and the watchdog timer system are still active. the software should exit wait mode to service the watchdog timer system before the cop timeout period. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
functional controller module (fcm) interrupts mc68hc(9)08lk60 rev. 1.0 advance information motorola functional controller module (fcm) 145 non-disclosure agreement required if the stop instruction is executed on an mcu with stop mode enabled, the watchdog timer circuit will be disabled. the cop timer is enabled when the mcu comes out of reset. note: the mc68hc(9)08lk60 does not allow stop mode operation. 8.6 interrupts the rtc submodule is capable of generating interrupts. three different interrupts can be generated by the clock sections of the real-time clock submodule: 1 minute, 1 hz, 2 hz, or 4 hz alarm chronograph, 10 hz these interrupts are enabled by setting the corresponding bit in the rtc control register. note: when an interrupt of 4 hz is selected, the periodic interrupt will vary from 5 hz to 3.3 hz with an average of 4 hz. 8.7 i/o signals the functional controller module is connected to the hc08 bus and has no external pins. 8.8 interrupt signals (fcm, cpu, and irq) the interrupt signals provide the capability for sending an interrupt request to the cpu. the fcm has one interrupt line coming out of the fcm to the system integration module and is an or function of the enabled interrupt sources (chronograph alarm, seconds, minutes, hours, or periodic interrupt). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required functional controller module (fcm) advance information mc68hc(9)08lk60 rev. 1.0 146 functional controller module (fcm) motorola 8.9 functional controller registers figure 8-3 provides a summary of the functional controller registers. addr. name bit 7 654321 bit 0 $0035 timebase control register (tbcr) read: rtce 0 chrc crs1 crs0 r tb2x tb0 write: tbclr reset: 0 0000000 $0036 rtc control register (rtccr) read: hrie minie secie chrie chrce alien prq1 prq0 write: reset: 0 0000000 $0037 rtc status register (rtcsr) read: 0 0 prqf horf minf secf aflg chrf write: reset: 0 0000000 $0038 chronograph data register (chrdr) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0000000 $0039 rtc seconds register (secr) read: 0 0 sec5 sec4 sec3 sec2 sec1 sec0 write: reset: 0 0000000 $003a rtc minutes register (minr) read: 0 0 min5 min4 min3 min2 min1 min0 write: reset: 0 0000000 $003b rtc hours register (horr) read: 0 0 0 hor4 hor3 hor2 hor1 hor0 write: reset: 0 0000000 = unimplemented r = reserved figure 8-3. summary of the functional controller registers f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
functional controller module (fcm) functional controller registers mc68hc(9)08lk60 rev. 1.0 advance information motorola functional controller module (fcm) 147 non-disclosure agreement required 8.9.1 timebase control register this timebase control register (tbcr) is a read/write register containing control bits for the timebase outputs which feed other circuits. rtce ?real-time clock enable bit when set to 1, the real-time clock counters are enabled. this bit is cleared by reset. note: enabling this bit will affect the clock that increments the seconds counter. it is recommended that this write be performed at the start of the reset sequence, to limit any timing discrepancies resulting from the timebase clocks. $003c alarm minutes register (alrmr) read: 0 0 am5 am4 am3 am2 am1 am0 write: reset: 0 0000000 $003d alarm hours register (alrhr) read: 0 0 0 ah4 ah3 ah2 ah1 ah0 write: reset: 0 0000000 = unimplemented r = reserved addr. name bit 7 654321 bit 0 figure 8-3. summary of the functional controller registers (continued) address: $0035 bit 7 654321 bit 0 read: rtce 0 chrc crs1 crs0 r tb2x tb0 write: tbclr reset: 00000000 r = reserved figure 8-4. timebase control register (tbcr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required functional controller module (fcm) advance information mc68hc(9)08lk60 rev. 1.0 148 functional controller module (fcm) motorola tbclr ?timebase clear bit when set to 1, the timebase counter chain is cleared. this bit will automatically clear after the timebase clear function has occurred. this bit will always read a 0 and is cleared by reset. note: clearing the timebase by setting tbclr will affect all clocks derived from the timebase, including the real-time clock inputs and the lcd. chrc ?chronograph clear bit this bit clears all bits in the chronograph data register and holds it at that state until this bit is cleared by software. 0 = allows chronograph data register to begin counting 1 = clears chronograph data register and holds value at $00 crs1 and crs0 ?cop rate select bit the value of these two bits determines the watchdog timer (wdt) timeout rate. these bits can be written only on the first write to this register after reset. if these bits are never written to, the wdt reset rate will be set at one second. note: although these bits default to 0, the user should write to these bits to prevent subsequent writes from changing the timeout rate. a bit set/clear for any bit in this register is executed as a read-modify- write of this register. if used as the first write to this register, further writes to crs[1:0] would not be valid, and the default value would be set. note: watchdog refresh shortens the minimum cop rates, given in table 8-1 , by 0.0067 seconds for 38.4-k crystal and by 0.008 seconds for 32-k crystal. table 8-1. watchdog timer timeout rates crs1 and crs0 minimum cop rate @32.000 khz minimum cop rate @38.400 khz 00 1 sec 0.85 sec 01 2 sec 1.7 sec 10 4 sec 3.4 sec 11 8 sec 6.8 sec f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
functional controller module (fcm) functional controller registers mc68hc(9)08lk60 rev. 1.0 advance information motorola functional controller module (fcm) 149 non-disclosure agreement required tb2x ?timebase times 2 bit when set to 1, the timebase counter chain is divided by two. this bit was added specifically to accommodate the use of the 76.8-khz crystal oscillator. this bit is cleared by reset. note: this bit can only be set once following a reset and can be written only on the first write to this register after reset. tbo ?timebase crystal option bit this bit is used to configure the timebase clocks for the crystal oscillator used to clock the mcu. refer to table 8-2 for the crystal options selected by these bits. this bit is cleared by reset. note: the timebase will start up as if the 38.4-khz option had been chosen until this bit is written to. this bit can only be set once following a reset and can be written only on the first write to this register after reset. it is recommended that this write be performed at the start of the reset sequence, to limit any timing discrepancies resulting from the timebase clocks. table 8-2. timebase crystal options tbo crystal (hz) 0 38,400 1 32,000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required functional controller module (fcm) advance information mc68hc(9)08lk60 rev. 1.0 150 functional controller module (fcm) motorola 8.9.2 rtc control register the rtc control register (rtccr) is a read/write register containing eight control bits. these bits enable the chronograph function and control interrupts associated with the rtc status register flags. hrie ?hours interrupt enable bit this bit controls whether an interrupt is generated when the horf bit is set in the rtc status register. 0 = interrupt disabled 1 = interrupt enabled minie ?minutes interrupt enable bit this bit controls whether an interrupt is generated when the minf bit is set in the rtc status register. 0 = interrupt disabled 1 = interrupt enabled secie ?seconds interrupt enable bit this bit controls whether an interrupt is generated when the secf bit is set in the rtc status register. 0 = interrupt disabled 1 = interrupt enabled chrie ?chronograph interrupt enable bit this bit controls whether an interrupt is generated when the chrf bit is set in the rtc status register. 0 = interrupt disabled 1 = interrupt enabled address: $0036 bit 7 654321 bit 0 read: hrie minie secie chrie chrce alien prq1 prq0 write: reset: 00000000 figure 8-5. rtc control register (rtccr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
functional controller module (fcm) functional controller registers mc68hc(9)08lk60 rev. 1.0 advance information motorola functional controller module (fcm) 151 non-disclosure agreement required chrce ?chronograph clock enable bit this bit controls the 100-hz clock signal to the rtc chronograph register. this bit is cleared by reset. 0 = 100-hz signal disabled, rtc chronograph off 1 = 100 hz signal enabled alien ?alarm interrupt enable bit this bit controls whether an interrupt is generated when the aflg bit is set in the rtc status register. 0 = interrupt disabled 1 = interrupt enabled prq1 and prq0 ?rtc periodic interrupt selection bits these bits control which frequency pulse should be sent from the rtc to generate a periodic interrupt request. this request is sent to the cpu. these bits select periodic interrupts of 1 hz, 2 hz, or 4 hz as shown in table 8-3 . note: when a periodic interrupt of 4 hz is selected, the periodic interrupt will vary from 5 hz to 3.3 hz with an average of 4 hz. table 8-3. prq1 and prq0 rtc interrupt periods prq1 and prq0 rtc interrupt period 00 rtc interrupt is disabled. 01 rtc interrupt is 1 hz. 10 rtc interrupt is 2 hz. 11 rtc interrupt is 4 hz. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required functional controller module (fcm) advance information mc68hc(9)08lk60 rev. 1.0 152 functional controller module (fcm) motorola 8.9.3 rtc status register the rtc status register (rtcsr) is a read-only register containing six status bits. see figure 8-6 . prqf ?periodic interrupt flag prqf is a status bit indicating that the 1 hz, 2 hz, or 4 hz interval has elapsed. when a a periodic interrupt of 4 hz is selected, the periodic interrupt will vary from 5 hz to 3.3 hz with an average of 4 hz. reset clears prqf. a cpu interrupt will be generated if the prq1 and prq0 bits are set in the rtccr. 0 = flag cleared by a read of the rtc status register with the prqf flag set, followed by a read of the rtc control register. both read operations need not be consecutive. 1 = flag automatically set at 1 hz, 2 hz, or 4 hz intervals. when a a periodic interrupt of 4 hz is selected, the periodic interrupt will vary from 5 hz to 3.3 hz with an average of 4 hz. horf ?hours flag horf is a status bit indicating that the hours counter has rolled over. reset clears horf. a cpu interrupt will be generated if the hrie bit is set in the rtccr. 0 = flag cleared by a read of the rtc status register with the horf flag set, followed by a read of the hours register. both read operations need not be consecutive. 1 = flag automatically set at 1-hour intervals address: $0037 bit 7 654321 bit 0 read: 0 0 prqf horf minf secf aflg chrf write: reset: 00000000 = unimplemented figure 8-6. rtc status register (rtcsr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
functional controller module (fcm) functional controller registers mc68hc(9)08lk60 rev. 1.0 advance information motorola functional controller module (fcm) 153 non-disclosure agreement required minf ?minutes flag minf is a status bit indicating that the minutes counter 1 has rolled over. reset clears minf. a cpu interrupt will be generated if the minie bit is set in the rtccr. 0 = flag cleared by a read of the rtc status register with the minf flag set, followed by a read of the minutes register. both read operations need not be consecutive. 1 = flag automatically set at 1-minute intervals secf ?seconds flag secf is a status bit indicating that the seconds counter 1-hz interval has elapsed. reset clears secf. a cpu interrupt will be generated if the secie bit is set in the rtccr. 0 = flag cleared by a read of the rtc status register with the secf flag set, followed by a read of the seconds register. both read operations need not be consecutive. 1 = flag automatically set at 1-hz intervals aflg ?alarm flag aflg is a status bit indicating that the hours counter matches the alarm hours register and the minutes counter matches the alarm minutes register. reset clears aflg. a cpu interrupt will be generated if the alien bit is set in the rtccr. 0 = flag cleared by a read of the rtc status register with the aflg flag set, followed by a read of the alarm minutes register. both read operations need not be consecutive. 1 = flag automatically set at scheduled alarm time chrf ?chronograph flag chrf is a status bit indicating that the chronograph 10-hz interval has elapsed. a cpu interrupt request will be generated if chrie is set. reset clears chrf. 0 = flag cleared by a read of the rtc status register with the chrf flag set, followed by a read of the chronograph data register. both read operations need not be consecutive. 1 = flag automatically set at 10-hz intervals f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required functional controller module (fcm) advance information mc68hc(9)08lk60 rev. 1.0 154 functional controller module (fcm) motorola 8.9.4 chronograph data register the chronograph data register (chrdr) is a read-only register containing the value of a counter which is driven by the 100-hz output of the timebase circuit. this counter has a resolution of 1 100 seconds, or 10 ms. the counter rolls over to 0 after reaching $ff. appropriate software must be written to convert the value read from this register in real time. 8.9.5 seconds data register the seconds data register (secr) is a read-write register containing the value of a counter which is driven by the 1-hz output of the timebase circuit. only six bits are used in this register, which rolls over to 0 when the count reaches 59. reset clears these bits. once the correct value is set in this register, the register will contain the current time in seconds. address: $0038 bit 7 654321 bit 0 read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 00000000 = unimplemented figure 8-7. chronograph data register (chrdr) address: $0039 bit 7 654321 bit 0 read: 0 0 sec5 sec4 sec3 sec2 sec1 sec0 write: reset: 00000000 = unimplemented figure 8-8. seconds data register (secr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
functional controller module (fcm) functional controller registers mc68hc(9)08lk60 rev. 1.0 advance information motorola functional controller module (fcm) 155 non-disclosure agreement required 8.9.6 minutes data register the minutes data register (minr) is a read-write register containing the value of a counter which is driven by the output of the seconds register. only six bits are used in this register, which rolls over to 0 when the count reaches 59. reset clears these bits. once the correct time is written to this register, it will contain the current time in minutes. 8.9.7 hours data register the hours data register (horr) is a read-write register containing the value of a counter which is driven by the output of the minutes register. only five bits are used in this register, which rolls over to 0 when the count reaches 23. reset clears these bits. once the current time is written to this register, it will contain the current time in the 24 hours clock. address: $003a bit 7 654321 bit 0 read: 0 0 min5 min4 min3 min2 min1 min0 write: reset: 00000000 = unimplemented figure 8-9. minutes data register (minr) address: $003b bit 7 654321 bit 0 read: 0 0 0 hor4 hor3 hor2 hor1 hor0 write: reset: 00000000 = unimplemented figure 8-10. hours data register (horr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required functional controller module (fcm) advance information mc68hc(9)08lk60 rev. 1.0 156 functional controller module (fcm) motorola 8.9.8 alarm minutes register the alarm minutes register (alrmr) is a read-write register containing the value for alarm generation used to match with the minutes data register. only six bits are used in this register. reset clears these bits. 8.9.9 alarm hours register the alarm hours register (alrhr) is a read-write register containing the value for alarm generation used to match with the hours data register. only five bits are used in this register. reset clears these bits. address: $003c bit 7 654321 bit 0 read: 0 0 am5 am4 am3 am2 am1 am0 write: reset: 00000000 = unimplemented figure 8-11. alarm minutes register (alrmr) address: $003d bit 7 654321 bit 0 read: 0 0 0 ah4 ah3 ah2 ah1 ah0 write: reset: 00000000 = unimplemented figure 8-12. alarm hours register (alrhr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola break module 157 non-disclosure agreement required advance information mc68hc(9)08lk60 section 9. break module 9.1 contents 9.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157 9.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158 9.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158 9.4.1 flag protection during break interrupts . . . . . . . . . . . . . .160 9.4.2 cpu during break interrupts. . . . . . . . . . . . . . . . . . . . . . .160 9.4.3 tim during break interrupts . . . . . . . . . . . . . . . . . . . . . . .160 9.4.4 cop during break interrupts . . . . . . . . . . . . . . . . . . . . . .160 9.5 break module registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161 9.5.1 break status and control register . . . . . . . . . . . . . . . . . .161 9.5.2 break address registers . . . . . . . . . . . . . . . . . . . . . . . . .162 9.6 low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 9.6.1 wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 9.6.2 stop mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 9.2 introduction this section describes the break module. the break module can generate a break interrupt that stops normal program flow at a defined address to enter a background program. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required break module advance information mc68hc(9)08lk60 rev. 1.0 158 break module motorola 9.3 features features of the break module include: accessible input/output (i/o) registers during the break interrupt cpu-generated break interrupts software-generated break interrupts computer operating properly (cop) disabling during break interrupts 9.4 functional description when the internal address bus matches the value written in the break address registers, the break module issues a breakpoint signal ( bkpt) to the system integration module (sim). the sim then causes the cpu to load the instruction register with a software interrupt instruction (swi) after completion of the current cpu instruction. the program counter vectors to $fffc and $fffd ($fefc and $fefd in monitor mode). these events can cause a break interrupt to occur: a cpu-generated address (the address in the program counter) matches the contents of the break address registers. software writes a logic 1 to the brka bit in the break status and control register. when a cpu-generated address matches the contents of the break address registers, the break interrupt begins after the cpu completes its current instruction. a return-from-interrupt instruction (rti) in the break routine ends the break interrupt and returns the mcu to normal operation. figure 9-1 shows the structure of the break module. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
break module functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola break module 159 non-disclosure agreement required figure 9-1. break module block diagram addr. name bit 7 654321 bit 0 $fe0c break address register high (brkh) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0000000 $fe0d break address register low (brkl) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0000000 $fe0e break status/control register (brkscr) read: brke brka 000000 write: reset: 0 0000000 = unimplemented figure 9-2. break i/o register summary iab[15:8] iab[7:0] 8-bit comparator 8-bit comparator control break address register low break address register high iab[15:0] bkpt to sim f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required break module advance information mc68hc(9)08lk60 rev. 1.0 160 break module motorola 9.4.1 flag protection during break interrupts the sim controls whether or not module status bits can be cleared during the break state. the bcfe bit in the sim break flag control register (sbfcr) enables software to clear status bits during the break state. for further information, see 6.8.3 sim break flag control register and the break interrupts subsection for each module. 9.4.2 cpu during break interrupts the cpu starts a break interrupt by: loading the instruction register with the swi instruction loading the program counter with $fffc?fffd; $fefc?fefd in monitor mode the break interrupt begins after completion of the cpu instruction in progress. if the break address register match occurs on the last cycle of a cpu instruction, the break interrupt begins immediately. 9.4.3 tim during break interrupts a break interrupt stops the timer counter. 9.4.4 cop during break interrupts the cop is disabled during a break interrupt when v dd +v hi is present on the rst pin. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
break module break module registers mc68hc(9)08lk60 rev. 1.0 advance information motorola break module 161 non-disclosure agreement required 9.5 break module registers three registers control and monitor operation of the break module: break status and control register (brkscr) break address register high (brkh) break address register low (brkl) 9.5.1 break status and control register the break status and control register (brkscr) contains break module enable and status bits. brke ?break enable bit this read/write bit enables breaks on break address register matches. clear brke by writing a logic 0 to bit 7. reset clears the brke bit. 1 = breaks enabled on 16-bit address match 0 = breaks disabled on 16-bit address match brka ?break active bit this read/write status and control bit is set when a break address match occurs. writing a logic 1 to brka generates a break interrupt. clear brka by writing a logic 0 to it before exiting the break routine. reset clears the brka bit. 1 = break address match 0 = no break address match address: $fe0e bit 7 654321 bit 0 read: brke brka 000000 write: reset: 00000000 = unimplemented figure 9-3. break status and control register (brkscr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required break module advance information mc68hc(9)08lk60 rev. 1.0 162 break module motorola 9.5.2 break address registers the break address registers (brkh and brkl) contain the high and low bytes of the desired breakpoint address. reset clears the break address registers. 9.6 low-power modes the wait and stop instructions put the mcu in low power- consumption standby modes. 9.6.1 wait mode if enabled, the break module is active in wait mode. in the break routine, the user can subtract one from the return address on the stack if sbsw is set. clear the sbsw bit by writing logic 0 to it. 9.6.2 stop mode a break interrupt causes exit from stop mode and sets the sbsw bit in the sim break status register. see 6.8 sim registers . note: the mc68hc(9)08lk60 does not allow stop mode operation. address: $fe0c bit 7 654321 bit 0 read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 00000000 figure 9-4. break address register high (brkh) address: $fe0d bit 7 654321 bit 0 read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 00000000 figure 9-5. break address register low (brkl) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola power-on reset module (por) 163 non-disclosure agreement required advance information mc68hc(9)08lk60 section 10. power-on reset module (por) 10.1 contents 10.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163 10.3 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163 10.2 introduction this section describes the power-on reset (por) module (version b). 10.3 functional description the por module provides a known, stable signal to the mcu at power- on. this signal tracks v dd until the mcu generates a feedback signal to indicate that it is properly initialized. at this time, the por drives its output low. the por is not a brown-out detector, low-voltage detector, or glitch detector. v dd at the por must go completely to 0 to reset the mcu. to detect power-loss conditions, use a low-voltage inhibit (lvi) module or other suitable circuit. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required power-on reset module (por) advance information mc68hc(9)08lk60 rev. 1.0 164 power-on reset module (por) motorola figure 10-1. por block diagram v dd porlo porhi cntrclr cntrrst notes: 1. porhi goes high at power-up and is cleared when the sim sets cntrclr. 2. signal names are not necessarily accurate. this diagram is for logical illustration only and may not represent actual circuitry. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola external interrupt module (irq) 165 non-disclosure agreement required advance information mc68hc(9)08lk60 section 11. external interrupt module (irq) 11.1 contents 11.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165 11.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165 11.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166 11.4.1 irq1 pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170 11.4.2 irq2 pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171 11.5 irq module during break interrupts . . . . . . . . . . . . . . . . . . .172 11.6 irq status and control register . . . . . . . . . . . . . . . . . . . . . .172 11.2 introduction this section describes the external interrupt (irq) module, which supports external interrupt functions. 11.3 features features of the irq module include: two dedicated external interrupt pins, irq1 and irq2 separate irq1 and irq2 interrupt masks irq2 interrupt disable hysteresis buffers f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required external interrupt module (irq) advance information mc68hc(9)08lk60 rev. 1.0 166 external interrupt module (irq) motorola 11.4 functional description a logic 0 applied to any of the external interrupt pins can latch a cpu interrupt request. figure 11-2 shows the structure of the irq module. interrupt signals on the irq1 pin are latched into the irq1 latch. interrupt signals on the irq2 pin are latched into the irq2 interrupt latch. an interrupt latch remains set until one of the following actions occurs: vector fetch a vector fetch automatically generates an interrupt acknowledge signal that clears the latch that caused the vector fetch. software clear ?software can clear an interrupt latch by writing to the appropriate acknowledge bit in the interrupt status and control register (iscr). writing a logic 1 to the ack1 bit clears the irq1 latch. writing a logic 1 to the ack2 bit clears the irq2 interrupt latch. reset ?a reset automatically clears both interrupt latches. addr. register name bit 7 654321 bit 0 $001d irq status and control register (iscr) read: pin2 0 imask2 mode2 irq2dis 0 imask1 mode1 write: ack2 ack1 reset: 0 0000000 = unimplemented figure 11-1. irq i/o register summary f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola external interrupt module (irq) 167 external interrupt module (irq) functional description non-disclosure agreement required figure 11-2. irq module block diagram synchronizer ack1 imask1 dq ck clr irq1 interrupt irq1 latch request v dd mode1 note: irq2dis does not prevent the reading of the state of the irq2 pin in the irq status and control register (iscr). ptb7 ptb7ie ptb7 pullup enable ptb0 ptb0ie irq2/kbi interrupt request irq2 ack2 dq ck clr v dd mode2 imask2 pin2 irq2dis irq2/keyboard interrupt latch synchronizer ptb0 pullup enable irq1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required external interrupt module (irq) advance information mc68hc(9)08lk60 rev. 1.0 168 external interrupt module (irq) motorola all of the external interrupt pins are falling-edge-triggered and are software-configurable to be both falling-edge and low-level-triggered. the mode1 bit in the iscr controls the triggering sensitivity of the irq1 pin. the mode2 bit controls the triggering sensitivity of the irq2 pin and the keyboard interrupt pins. when an interrupt pin is edge-triggered only, the interrupt latch remains set until a vector fetch, software clear, or reset occurs. when an interrupt pin is both falling-edge and low-level-triggered, the interrupt latch remains set until both of these occur: vector fetch, software clear, or reset return of the interrupt pin to logic 1 the vector fetch or software clear may occur before or after the interrupt pin returns to logic 1. as long as the pin is low, the interrupt request remains pending. when set, the imask1 and imask2 bits in the iscr mask all external interrupt requests. a latched interrupt request is not presented to the interrupt priority logic unless the corresponding imask bit is clear. note: the interrupt mask (i) in the condition code register (ccr) masks all interrupt requests, including external interrupt requests. (see figure 11-3 .) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
external interrupt module (irq) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola external interrupt module (irq) 169 non-disclosure agreement required figure 11-3. irq interrupt flowchart from reset i bit set? fetch next yes no interrupt? instruction swi instruction? rti instruction? no stack cpu registers no set i bit load pc with interrupt vector no yes unstack cpu registers execute instruction yes yes f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required external interrupt module (irq) advance information mc68hc(9)08lk60 rev. 1.0 170 external interrupt module (irq) motorola 11.4.1 irq1 pin a logic 0 on the irq1 pin can latch an interrupt request into the irq1 latch. a vector fetch, software clear, or reset clears the irq1 latch. if the mode1 bit is set, the irq1 pin is both falling-edge-sensitive and low-level-sensitive. with mode1 set, both of these actions must occur to clear the irq1 latch: vector fetch, software clear, or reset ?a vector fetch generates an interrupt acknowledge signal to clear the latch. software may generate the interrupt acknowledge signal by writing a logic 1 to the ack1 bit in the interrupt status and control register (iscr). the ack1 bit is useful in applications that poll the irq1 pin and require software to clear the irq1 latch. writing to the ack1 bit can also prevent spurious interrupts due to noise. setting ack1 does not affect subsequent transitions on the irq1 pin. a falling edge that occurs after writing to the ack1 bit latches another interrupt request. if the irq1 mask bit, imask1, is clear, the cpu loads the program counter with the vector address at locations $fffa and $fffb. return of the irq1 pin to logic 1 ?as long as the irq1 pin is at logic 0, the irq1 latch remains set. the vector fetch or software clear and the return of the irq1 pin to logic 1 may occur in any order. the interrupt request remains pending as long as the irq1 pin is at logic 0. if the mode1 bit is clear, the irq1 pin is falling-edge-sensitive only. with mode1 clear, a vector fetch or software clear immediately clears the irq1 latch. use the bih or bil instruction to read the logic level on the irq1 pin. note: when using the level-sensitive interrupt trigger, avoid false interrupts by masking interrupt requests in the interrupt routine. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
external interrupt module (irq) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola external interrupt module (irq) 171 non-disclosure agreement required 11.4.2 irq2 pin when the irq2dis bit is clear, a logic 0 on the irq2 pin can latch an interrupt request into the irq2/keyboard interrupt latch. a vector fetch, software clear, or reset clears the irq2/keyboard interrupt latch. if the mode2 bit is set, the irq2 pin is both falling-edge-sensitive and low-level-sensitive. with mode2 set, both of these actions must occur to clear the irq2 interrupt latch: vector fetch, software clear, or reset ?a vector fetch generates an interrupt acknowledge signal to clear the latch. software may generate the interrupt acknowledge signal by writing a logic 1 to the ack2 bit in the interrupt status and control register (iscr). the ack2 bit is useful in applications that poll the irq2 pin and require software to clear the irq2 interrupt latch. writing to the ack2 bit can also prevent spurious interrupts due to noise. setting ack2 does not affect subsequent transitions on the irq2 pin. a falling edge that occurs after writing to the ack2 bit latches another interrupt request. if the irq2 mask bit, imask2, is clear, the cpu loads the program counter with the vector address at locations $ffd2 and $ffd3. return of the irq2 pin to logic 1 ?as long as the irq2 pin is at logic 0, the irq2 interrupt latch remains set. the vector fetch or software clear and the return of the irq2 pin to logic 1 may occur in any order. the interrupt request remains pending as long as the irq2 pin is at logic 0. if the mode2 bit is clear, the irq2 pin is falling-edge-sensitive only. with mode2 clear, a vector fetch or software clear immediately clears the irq2 interrupt latch. to determine the logic level on the irq2 pin, read the irq2 pin state bit, pin2, in the iscr. this bit reflects the value of the irq2 pin, even when the irq2dis bit is set. note: see section 19. keyboard interrupt (kbi) module for more information about keyboard interrupt. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required external interrupt module (irq) advance information mc68hc(9)08lk60 rev. 1.0 172 external interrupt module (irq) motorola 11.5 irq module during break interrupts the system integration module (sim) controls whether the irq1 and irq2 interrupt latches can be cleared during the break state. the bcfe bit in the sim break flag control register (sbfcr) enables software to clear the latches during the break state. (see 6.8.3 sim break flag control register .) to allow software to clear the irq1 latch and the irq2 interrupt latch during a break interrupt, write a logic 1 to the bcfe bit. if a latch is cleared during the break state, it remains cleared when the mcu exits the break state. to protect the latches during the break state, write a logic 0 to the bcfe bit. with bcfe at logic 0 (its default state), writing to the ack1 and ack2 bits in the irq status and control register during the break state has no effect on the irq latches. see 11.6 irq status and control register . 11.6 irq status and control register the irq status and control register (iscr) controls and monitors operation of the irq module. it has these functions: shows current state of irq2 pin clears the irq1 and irq2 interrupt latches masks irq1 and irq2 interrupt requests controls triggering sensitivity of the irq1 and irq2 interrupt pins disables irq2 interrupt requests f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
external interrupt module (irq) irq status and control register mc68hc(9)08lk60 rev. 1.0 advance information motorola external interrupt module (irq) 173 non-disclosure agreement required pin2 irq2 pin state bit this read-only bit reflects the current logic level of the irq2 pin. 1 = irq2 pin at logic 1 0 = irq2 pin at logic 0 ack2 ?irq2 interrupt request acknowledge bit writing a logic 1 to this write-only bit clears the irq2/keyboard interrupt latch. ack2 always reads as logic 0. reset clears ack2. imask2 irq2 interrupt mask bit writing a logic 1 to this read/write bit prevents the output of the irq2/keyboard interrupt latch from generating interrupt requests. reset clears imask2. 1 = irq2 pin interrupt request disabled 0 = irq2 pin interrupt request enabled mode2 ?irq2/keyboard interrupt edge/level select bit this read/write bit controls the triggering sensitivity of the irq2 interrupt pin. reset clears mode2. 1 = irq2 interrupt request on falling edges and low levels 0 = irq2 interrupt request on falling edges only irq2dis irq2 pin interrupt latch disable bit this read/write bit prevents the irq2 pin from latching interrupt requests into the irq2 interrupt latch. reset clears irq2dis. 1 = irq2 pin interrupt requests not latched 0 = irq2 pin interrupt requests latched address: $001d bit 7 654321 bit 0 read: pin2 0 imask2 mode2 irq2dis 0 imask1 mode1 write: ack2 ack1 reset: 00000000 = unimplemented figure 11-4. irq status and control register (iscr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required external interrupt module (irq) advance information mc68hc(9)08lk60 rev. 1.0 174 external interrupt module (irq) motorola ack1 ?irq1 interrupt request acknowledge bit writing a logic 1 to this write-only bit clears the irq1 latch. ack1 always reads as logic 0. reset clears ack1. imask1 ?irq1 interrupt mask bit writing a logic 1 to this read/write bit disables irq1 interrupt requests. reset clears imask1. 1 = irq1 interrupt requests disabled 0 = irq1 interrupt requests enabled mode1 ?irq1 edge/level select bit this read/write bit controls the triggering sensitivity of the irq1 pin. reset clears mode1. 1 = irq1 interrupt request on falling edges and low levels 0 = irq1 interrupt request on falling edges only f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 175 non-disclosure agreement required advance information mc68hc(9)08lk60 section 12. infrared serial communications interface (irsci) 12.1 contents 12.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176 12.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176 12.4 irsci module overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177 12.5 infrared functional description. . . . . . . . . . . . . . . . . . . . . . . .178 12.5.1 infrared transmit encoder. . . . . . . . . . . . . . . . . . . . . . . . .179 12.5.2 infrared receive decoder . . . . . . . . . . . . . . . . . . . . . . . . .180 12.6 sci functional description . . . . . . . . . . . . . . . . . . . . . . . . . . .180 12.6.1 data format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 12.6.2 transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 12.6.2.1 character length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 12.6.2.2 character transmission . . . . . . . . . . . . . . . . . . . . . . . . .184 12.6.2.3 break characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 12.6.2.4 idle characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186 12.6.2.5 transmitter interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . .187 12.6.3 receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 12.6.3.1 character length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 12.6.3.2 character reception . . . . . . . . . . . . . . . . . . . . . . . . . . .187 12.6.3.3 data sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 12.6.3.4 framing errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191 12.6.3.5 baud rate tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . .191 12.6.3.6 receiver wakeup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194 12.6.3.7 receiver interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . .195 12.6.3.8 error interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .195 12.7 wait mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196 12.8 sci during break module interrupts. . . . . . . . . . . . . . . . . . . .196 12.9 i/o signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196 12.9.1 txd (transmit data) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197 12.9.2 rxd (receive data) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 176 infrared serial communications interface (irsci) motorola 12.10 i/o registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198 12.10.1 sci control register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . .198 12.10.2 sci control register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . .201 12.10.3 sci control register 3 . . . . . . . . . . . . . . . . . . . . . . . . . . .204 12.10.4 sci status register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . .206 12.10.5 sci status register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 12.10.6 sci data register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211 12.10.7 sci baud rate register . . . . . . . . . . . . . . . . . . . . . . . . . .211 12.10.8 sci infrared control register . . . . . . . . . . . . . . . . . . . . . .213 12.2 introduction this section describes the infrared serial communications interface (irsci) module which allows high-speed asynchronous communications with peripheral devices and other mcus. note: references to dma (direct memory access) and associated functions are only valid if the mcu has a dma module. this mcu does not have the dma function. any dma-related register bits should be left in their reset state for normal mcu operation. 12.3 features features of the irsci module include: full duplex operation software selectable infrared modulation/demodulation (3/16, 1/16, or 1/32) standard mark/space non-return-to-zero (nrz) format programmable 8-bit or 9-bit character length separately enabled transmitter and receiver separate receiver and transmitter cpu interrupt requests two receiver wakeup methods: idle line wakeup address mark wakeup f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) irsci module overview mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 177 non-disclosure agreement required interrupt-driven operation with eight interrupt flags: transmitter empty transmission complete receiver full idle receiver input receiver overrun noise error framing error parity error receiver framing error detection hardware parity checking 1/16 bit-time noise detection 12.4 irsci module overview the irsci consists of a modified serial communications interface (sci) and the infrared interface submodule as shown in figure 12-1 . the infrared block receives two clock sources from the sci, sci_r16xclk and sci_r32xclk, which are configured to generate the narrow pulse width during transmission. the sci_r16xclk and sci_r32xclk are internal clocks with frequencies 16 and 32 times the baud rate, respectively. both sci_r16xclk and sci_r32xclk clocks are used for transmitting data. the sci_r16xclk clock is used only for receiving data. the infrared submodule consists of two major blocks: the transmit encoder and the receive decoder which will be discussed in 12.5 infrared functional description . the sci transmits serial bits of data which are encoded by the infrared submodule to transmit a narrow low pulse for every zero bit. no low pulse is transmitted for every one bit. when receiving data, the ir pulses should be detected using an ir photo diode and transformed to cmos levels by the ir receive decoder (external from the mcu). the zero pulses are then stretched by the infrared submodule to return to a serial bit stream to be received by the sci. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 178 infrared serial communications interface (irsci) motorola figure 12-1. sci and ir system block diagram caution: for proper sci function (transmit or receive), the bus clock (cgmout 2) must be programmed to at least 32 times that of the selected baud rate. note: when the infrared submodule is disabled, pins txd and rxd pass through unchanged to the sci. 12.5 infrared functional description the infrared submodule consists of two major blocks: a transmit encoder and a receive decoder as shown in figure 12-2 . rxd txd txd rxd infrared submodule txd rxd sci_r16xclk sci_r32xclk serial communications cgmout 2 mcu adx/data/control bus tx/rx clock generator interface (sci) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) infrared functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 179 non-disclosure agreement required figure 12-2. infrared submodule diagram this module provides the capability of transmitting narrow pulses to the ir led and receiving narrow pulses and transforming them to serial bits, which are sent to the sci. the infrared submodule receives its clock sources from the sci. one of these two clocks are selected in the infrared submodule to generate either 3/16, 1/16, or 1/32 narrow pulses during transmission. 12.5.1 infrared transmit encoder the infrared transmit block converts serial bits of data from the sci module to narrow low pulses (pin txd) when a zero bit in the serial stream is received. the narrow pulse is sent in the middle of the bit with a duration of 1/32, 1/16, or 3/16 of a bit time . when two 0s are sent, the first narrow pulse is sent in the middle of the bit, and then after one bit time, another narrow pulse is sent in the middle of the second bit. rxd txd txd rxd transmit ir_txd rxd sci_r16xclk sci_r32xclk tnp[1:0] mux txd encoder iren receive decoder iren mux ir_rxd f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 180 infrared serial communications interface (irsci) motorola 12.5.2 infrared receive decoder the infrared receive block converts low narrow pulses from pin rxd to standard sci data bits using the sci_r16xck clock. this signal clocks a 4-bit internal counter which ranges from 0 to 15. the incoming pulse enables the internal counter and a 0 is sent out to the ir_rxd output. if a second pulse or several pulses occur between count 0 and 7, these pulses are ignored. when the counter is greater than 7, and if another pulse occurs, the counter is reset and the ir_rxd output remains 0. after the counter reaches 15, the ir_rxd output returns to 1. the circuit then waits for another input pulse and the process is repeated. if a pulse arrives shortly after the counter reaches 15 due to jitter, the ir_rxd output remains 1 until the pulse occurs. then a 0 is sent out to ir_rxd. 12.6 sci functional description these changes are made to the standard sci which is used in mc68hc(9)08lj60: the prescaler is eliminated (including the divide-by-4 stage) to minimize the input frequency and allow for the 32x clock needed for ir modulation. the txinv bit is removed from scc1. the pin control logic was changed to allow for seperate enable/disable of the rxd and/or txd pads based upon whether the associated function is enabled. the clock input to the baud rate generator is not divided by 4. for example, the baud rate equation is different by a factor of 4. figure 12-3 shows the structure of the sci. the sci allows full-duplex, asynchronous, nrz serial communication between the mcu and remote devices, including other mcus. the transmitter and receiver of the sci operate independently, although they use the same baud rate generator. during normal operation, the cpu monitors the status of the sci, writes the data to be transmitted, and processes received data. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) sci functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 181 non-disclosure agreement required figure 12-3. sci module block diagram scte tc scrf idle or nf fe pe sctie tcie scrie ilie te re rwu sbk r8 t8 dmate orie feie peie bkf rpf sci data receive shift register sci data register transmit shift register neie m wake ilty flag control transmit control receive control data selection control wakeup pty pen register dma interrupt control transmitter interrupt control receiver interrupt control error interrupt control control dmare ensci loops ensci rxd txd internal bus txinv loops 16 pre- scaler baud rate generator cgmout 2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 182 infrared serial communications interface (irsci) motorola addr. register name bit 7 6 5 4 3 2 1 bit 0 $0013 sci control register 1 (scc1) read: loops ensci 0 m wake ilty pen pty write: reset: 0 0 0 0 0 0 0 0 $0014 sci control register 2 (scc2) read: sctie tcie scrie ilie te re rwu sbk write: reset: 0 0 0 0 0 0 0 0 $0015 sci control register 3 (scc3) read: r8 t8 dmare dmate orie neie feie peie write: reset: u u 0 0 0 0 0 0 $0016 sci status register 1 (scs1) read: scte tc scrf idle or nf fe pe write: reset: 1 1 0 0 0 0 0 0 $0017 sci status register 2 (scs2) read: bkf rpf write: reset: 0 0 0 0 0 0 0 0 $0018 sci data register (scdr) read: r7 r6 r5 r4 r3 r2 r1 r0 write: t7 t6 t5 t4 t3 t2 t1 t0 reset: unaffected by reset $0019 sci baud rate register (scbr) read: 0 0 0 0 0 scr2 scr1 scr0 write: reset: 0 0 0 0 0 0 0 0 $001e sci infrared control register (scircr) read: 0 0 0 0 0 tnp1 tnp0 iren write: reset: 0 0 0 0 0 0 0 0 = unimplemented u = undetermined figure 12-4. irsci i/o register summary f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) sci functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 183 non-disclosure agreement required 12.6.1 data format the sci uses the standard non-return-to-zero mark/space data format illustrated in figure 12-5 . figure 12-5. sci data formats (8-bit/9-bit for standard sci and infrared) 12.6.2 transmitter figure 12-6 shows the structure of the sci transmitter. note: the transmission output pin is enabled by te bit of scc2 instead of ensci bit of scc1. 12.6.2.1 character length the transmitter can accommodate either 8-bit or 9-bit data. the state of the m bit in sci control register 1 (scc1) determines character length. when transmitting 9-bit data, bit t8 in sci control register 3 (scc3) is the ninth bit (bit 8). bit 5 start bit bit 0 bit 1 next stop bit start bit 8-bit data format bit m in scc1 clear start bit bit 0 next stop bit start bit 9-bit data format bit m in scc1 set bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 8 bit 2 bit 3 bit 4 bit 6 bit 7 possible parity bit possible parity bit standard sci data infrared sci data standard sci data infrared sci data f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 184 infrared serial communications interface (irsci) motorola 12.6.2.2 character transmission during an sci transmission, the transmit shift register shifts a character out to the txd pin. the sci data register (scdr) is the write-only buffer between the internal data bus and the transmit shift register. to initiate an sci transmission: 1. enable the sci by writing a logic 1 to the enable sci bit (ensci) in sci control register 1 (scc1). 2. enable the transmitter by writing a logic 1 to the transmitter enable bit (te) in sci control register 2 (scc2). 3. clear the sci transmitter empty bit by first reading sci status register 1 (scs1) and then writing to the scdr. 4. repeat step 3 for each subsequent transmission. at the start of a transmission, transmitter control logic automatically loads the transmit shift register with a preamble of logic 1s. after the preamble shifts out, control logic transfers the scdr data into the transmit shift register. a logic 0 start bit automatically goes into the least significant bit (lsb) position of the transmit shift register. a logic 1 stop bit goes into the most significant bit (msb) position. the sci transmitter empty bit, scte, in scs1 becomes set when the scdr transfers a byte to the transmit shift register. the scte bit indicates that the scdr can accept new data from the internal data bus. if the sci transmit interrupt enable bit, sctie, in scc2 is also set, the scte bit generates a transmitter interrupt request. when the transmit shift register is not transmitting a character, the txd pin goes to the idle condition, logic 1 (in either standard or infrared modes). if at any time software clears the ensci bit in sci control register 1 (scc1), the transmitter and receiver relinquish control of the sci pins. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) sci functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 185 non-disclosure agreement required figure 12-6. sci transmitter 12.6.2.3 break characters writing a logic 1 to the send break bit, sbk, in scc2 loads the transmit shift register with a break character. a break character contains all logic 0s and has no start, stop, or parity bit. break character length depends on the m bit in scc1. as long as sbk is at logic 1, transmitter logic continuously loads break characters into the transmit shift register. after software clears the sbk bit, the shift register finishes transmitting the last break character and then transmits at least one logic 1. the automatic logic 1 at the end of a break character guarantees the recognition of the start bit of the next character. dmate scte pen pty h876543210l 11-bit transmit stop start t8 dmate scte sctie tcie sbk tc parity generation msb sci data register load from scdr shift enable preamble (all 1s) break (all 0s) transmitter control logic shift register dmate tc sctie tcie scte transmitter cpu interrupt request transmitter dma service request m ensci loops te txd internal bus scr2 scr1 scr0 baud divider sctie (n/a) cgmout 2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 186 infrared serial communications interface (irsci) motorola the sci recognizes a break character when a start bit is followed by eight or nine logic 0 data bits and a logic 0 where the stop bit should be. receiving a break character has these effects on sci registers: sets the framing error bit (fe) in scs1 sets the sci receiver full bit (scrf) in scs1 clears the sci data register (scdr) clears the r8 bit in scc3 sets the break flag bit (bkf) in scs2 may set the overrun (or), noise flag (nf), parity error (pe), or reception-in-progress flag (rpf) bits 12.6.2.4 idle characters an idle character contains all logic 1s and has no start, stop, or parity bit. idle character length depends on the m bit in scc1. the preamble is a synchronizing idle character that begins every transmission. if the te bit is cleared during a transmission, the txd pin becomes idle after completion of the transmission in progress. clearing and then setting the te bit during a transmission queues an idle character to be sent after the character currently being transmitted. note: when queueing an idle character, return the te bit to logic 1 before the stop bit of the current character shifts out to the txd pin. setting te after the stop bit appears on txd causes data previously written to the scdr to be lost. a good time to toggle the te bit is when the scte bit becomes set and just before writing the next byte to the scdr. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) sci functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 187 non-disclosure agreement required 12.6.2.5 transmitter interrupts these conditions can generate cpu interrupt requests from the sci transmitter: sci transmitter empty (scte) the scte bit in scs1 indicates that the scdr has transferred a character to the transmit shift register. scte can generate a transmitter cpu interrupt request. setting the sci transmit interrupt enable bit, sctie, in scc2 enables the scte bit to generate transmitter cpu interrupt requests. transmission complete (tc) the tc bit in scs1 indicates that the transmit shift register and the scdr are empty and that no break or idle character has been generated. the transmission complete interrupt enable bit, tcie, in scc2 enables the tc bit to generate transmitter cpu interrupt requests. 12.6.3 receiver figure 12-7 shows the structure of the sci receiver. 12.6.3.1 character length the receiver can accommodate either 8-bit or 9-bit data. the state of the m bit in sci control register 1 (scc1) determines character length. when receiving 9-bit data, bit r8 in sci control register 2 (scc2) is the ninth bit (bit 8). when receiving 8-bit data, bit r8 is a copy of the eighth bit (bit 7). 12.6.3.2 character reception during an sci reception, the receive shift register shifts characters in from the rxd pin. the sci data register (scdr) is the read-only buffer between the internal data bus and the receive shift register. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 188 infrared serial communications interface (irsci) motorola figure 12-7. sci receiver block diagram all 1s all 0s m wake ilty pen pty bkf rpf h876543210l 11-bit receive shift register stop start data recovery dmare scrf or orie nf neie fe feie pe peie dmare scrie scrf ilie idle wakeup logic parity checking msb error cpu interrupt request dma service request (n/a) cpu interrupt request sci data register r8 dmare orie neie feie peie scrie ilie rwu scrf idle or nf fe pe internal bus baud divider 16 scr2 scr1 scr0 scrie dmare cgmout 2 rxd f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) sci functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 189 non-disclosure agreement required after a complete character shifts into the receive shift register, the data portion of the character transfers to the scdr. the sci receiver full bit, scrf, in sci status register 1 (scs1) becomes set, indicating that the received byte can be read. if the sci receive interrupt enable bit, scrie, in scc2 is also set, the scrf bit generates a receiver cpu interrupt request. 12.6.3.3 data sampling the receiver samples the rxd pin at the rt clock rate. the rt clock is an internal signal with a frequency 16 times the baud rate. to adjust for baud rate mismatch, the rt clock is resynchronized at the following times (see figure 12-8 ): after every start bit after the receiver detects a data bit change from logic 1 to logic 0 (after the majority of data bit samples at rt8, rt9, and rt10 returns a valid logic 1 and the majority of the next rt8, rt9, and rt10 samples returns a valid logic 0) to locate the start bit, data recovery logic does an asynchronous search for a logic 0 preceded by three logic 1s. when the falling edge of a possible start bit occurs, the rt clock begins to count to 16. figure 12-8. receiver data sampling rt clock reset rt1 rt1 rt1 rt1 rt1 rt1 rt1 rt1 rt1 rt2 rt3 rt4 rt5 rt8 rt7 rt6 rt11 rt10 rt9 rt15 rt14 rt13 rt12 rt16 rt1 rt2 rt3 rt4 start bit qualification start bit verification data sampling samples rt clock rt clock state start bit lsb rxd f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 190 infrared serial communications interface (irsci) motorola to verify the start bit and to detect noise, data recovery logic takes samples at rt3, rt5, and rt7. table 12-1 summarizes the results of the start bit verification samples. if start bit verification is not successful, the rt clock is reset and a new search for a start bit begins. to determine the value of a data bit and to detect noise, recovery logic takes samples at rt8, rt9, and rt10. table 12-2 summarizes the results of the data bit samples. table 12-1. start bit veri?ation rt3, rt5, and rt7 samples start bit verification noise flag 000 yes 0 001 yes 1 010 yes 1 011 no 0 100 yes 1 101 no 0 110 no 0 111 no 0 table 12-2. data bit recovery rt8, rt9, and rt10 samples data bit determination noise flag 000 0 0 001 0 1 010 0 1 011 1 1 100 0 1 101 1 1 110 1 1 111 1 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) sci functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 191 non-disclosure agreement required note: the rt8, rt9, and rt10 samples do not affect start bit verification. if any or all of the rt8, rt9, and rt10 start bit samples are logic 1s following a successful start bit verification, the noise flag (nf) is set and the receiver assumes that the bit is a start bit. to verify a stop bit and to detect noise, recovery logic takes samples at rt8, rt9, and rt10. table 12-3 summarizes the results of the stop bit samples. 12.6.3.4 framing errors if the data recovery logic does not detect a logic 1 where the stop bit should be in an incoming character, it sets the framing error bit, fe, in scs1. the fe flag is set at the same time that the scrf bit is set. a break character that has no stop bit also sets the fe bit. 12.6.3.5 baud rate tolerance a transmitting device may be operating at a baud rate below or above the receiver baud rate. accumulated bit time misalignment can cause one of the three stop bit data samples to fall outside the actual stop bit. then a noise error occurs. if more than one of the samples is outside the stop bit, a framing error occurs. in most applications, the baud rate tolerance is much more than the degree of misalignment that is likely to occur. table 12-3. stop bit recovery rt8, rt9, and rt10 samples framing error flag noise flag 000 1 0 001 1 1 010 1 1 011 0 1 100 1 1 101 0 1 110 0 1 111 0 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 192 infrared serial communications interface (irsci) motorola as the receiver samples an incoming character, it resynchronizes the rt clock on any valid falling edge within the character. resynchronization within characters corrects misalignments between transmitter bit times and receiver bit times. slow data tolerance figure 12-9 shows how much a slow received character can be misaligned without causing a noise error or a framing error. the slow stop bit begins at rt8 instead of rt1 but arrives in time for the stop bit data samples at rt8, rt9, and rt10. figure 12-9. slow data for an 8-bit character, data sampling of the stop bit takes the receiver 9 bit times 16 rt cycles + 10 rt cycles = 154 rt cycles. with the misaligned character shown in figure 12-9 , the receiver counts 154 rt cycles at the point when the count of the transmitting device is 9 bit times 16 rt cycles + 3 rt cycles = 147 rt cycles. the maximum percent difference between the receiver count and the transmitter count of a slow 8-bit character with no errors is for a 9-bit character, data sampling of the stop bit takes the receiver 10 bit times 16 rt cycles + 10 rt cycles = 170 rt cycles. with the misaligned character shown in figure 12-9 , the receiver counts 170 rt cycles at the point when the count of the transmitting device is 10 bit times 16 rt cycles + 3 rt cycles = 163 rt cycles. msb stop rt1 rt2 rt3 rt4 rt5 rt6 rt7 rt8 rt9 rt10 rt11 rt12 rt13 rt14 rt15 rt16 data samples receiver rt clock 154 147 154 ------------------------- - 100 4.54% = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) sci functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 193 non-disclosure agreement required the maximum percent difference between the receiver count and the transmitter count of a slow 9-bit character with no errors is fast data tolerance figure 12-10 shows how much a fast received character can be misaligned without causing a noise error or a framing error. the fast stop bit ends at rt10 instead of rt16 but is still there for the stop bit data samples at rt8, rt9, and rt10. figure 12-10. fast data for an 8-bit character, data sampling of the stop bit takes the receiver 9 bit times 16 rt cycles + 10 rt cycles = 154 rt cycles. with the misaligned character shown in figure 12-10 , the receiver counts 154 rt cycles at the point when the count of the transmitting device is 10 bit times 16 rt cycles = 160 rt cycles. the maximum percent difference between the receiver count and the transmitter count of a fast 8-bit character with no errors is for a 9-bit character, data sampling of the stop bit takes the receiver 10 bit times 16 rt cycles + 10 rt cycles = 170 rt cycles. with the misaligned character shown in figure 12-10 , the receiver counts 170 rt cycles at the point when the count of the transmitting device is 11 bit times 16 rt cycles = 176 rt cycles. 170 163 170 ------------------------- - 100 4.12% = idle or next character stop rt1 rt2 rt3 rt4 rt5 rt6 rt7 rt8 rt9 rt10 rt11 rt12 rt13 rt14 rt15 rt16 data samples receiver rt clock 154 160 154 ------------------------- - 100 3.90% ? = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 194 infrared serial communications interface (irsci) motorola the maximum percent difference between the receiver count and the transmitter count of a fast 9-bit character with no errors is 12.6.3.6 receiver wakeup so that the mcu can ignore transmissions intended only for other receivers in multiple-receiver systems, the receiver can be put into a standby state. setting the receiver wakeup bit, rwu, in scc2 puts the receiver into a standby state during which receiver interrupts are disabled. depending on the state of the wake bit in scc1, either of two conditions on the rxd pin can bring the receiver out of the standby state: address mark ?an address mark is a logic 1 in the most significant bit position of a received character. when the wake bit is set, an address mark wakes the receiver from the standby state by clearing the rwu bit. the address mark also sets the sci receiver full bit, scrf. software can then compare the character containing the address mark to the user-defined address of the receiver. if they are the same, the receiver remains awake and processes the characters that follow. if they are not the same, software can set the rwu bit and put the receiver back into the standby state. idle input line condition ?when the wake bit is clear, an idle character on the rxd pin wakes the receiver from the standby state by clearing the rwu bit. the idle character that wakes the receiver does not set the receiver idle bit, idle, or the sci receiver full bit, scrf. the idle line type bit, ilty, determines whether the receiver begins counting logic 1s as idle character bits after the start bit or after the stop bit. note: clearing the wake bit after the rxd pin has been idle may cause the receiver to wake up immediately. 170 176 170 ------------------------- - 100 3.53% = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) sci functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 195 non-disclosure agreement required 12.6.3.7 receiver interrupts these sources can generate cpu interrupt requests from the sci receiver: sci receiver full (scrf) ?the scrf bit in scs1 indicates that the receive shift register has transferred a character to the scdr. scrf can generate a receiver interrupt request. setting the sci receive interrupt enable bit, scrie, in scc2 enables the scrf bit to generate receiver cpu interrupts. idle input (idle) ?the idle bit in scs1 indicates that 10 or 11 consecutive logic 1s shifted in from the rxd pin. the idle line interrupt enable bit, ilie, in scc2 enables the idle bit to generate cpu interrupt requests. 12.6.3.8 error interrupts these receiver error flags in scs1 can generate cpu interrupt requests: receiver overrun (or) ?the or bit indicates that the receive shift register shifted in a new character before the previous character was read from the scdr. the previous character remains in the scdr, and the new character is lost. the overrun interrupt enable bit, orie, in scc3 enables or to generate sci error cpu interrupt requests. noise flag (nf) the nf bit is set when the sci detects noise on incoming data or break characters, including start, data, and stop bits. the noise error interrupt enable bit, neie, in scc3 enables nf to generate sci error cpu interrupt requests. framing error (fe) ?the fe bit in scs1 is set when a logic 0 occurs where the receiver expects a stop bit. the framing error interrupt enable bit, feie, in scc3 enables fe to generate sci error cpu interrupt requests. parity error (pe) ?the pe bit in scs1 is set when the sci detects a parity error in incoming data. the parity error interrupt enable bit, peie, in scc3 enables pe to generate sci error cpu interrupt requests. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 196 infrared serial communications interface (irsci) motorola 12.7 wait mode the sci module remains active after the execution of a wait instruction. in wait mode the sci module registers are not accessible by the cpu. any enabled cpu interrupt request from the sci module can bring the mcu out of wait mode. if sci module functions are not required during wait mode, reduce power consumption by disabling the module before executing the wait instruction. 12.8 sci during break module interrupts the system integration module (sim) controls whether status bits in other modules can be cleared during interrupts generated by the break module. the bcfe bit in the sim break flag control register (sbfcr) enables software to clear status bits during the break state. to allow software to clear status bits during a break interrupt, write a logic 1 to the bcfe bit. if a status bit is cleared during the break state, it remains cleared when the mcu exits the break state. to protect status bits during the break state, write a logic 0 to the bcfe bit. with bcfe at logic 0 (its default state), software can read and write i/o registers during the break state without affecting status bits. some status bits have a two-step read/write clearing procedure. if software does the first step on such a bit before the break, the bit cannot change during the break state as long as bcfe is at logic 0. after the break, doing the second step clears the status bit. 12.9 i/o signals the two irsci input/output (i/o) pins are: txd ?transmit data rxd ?receive data f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) i/o signals mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 197 non-disclosure agreement required 12.9.1 txd (transmit data) this pin transmits sci (standard or infrared) data. it will idle high in either mode and is high impedance anytime the transmitter is disabled. 12.9.2 rxd (receive data) this pin receives sci (standard or infrared) data. an idle line is detected as a line high. this input is ignored when the receiver is disabled and should be terminated to a known voltage. a summary of the i/o pin considerations is given in table 12-4 . table 12-4. sci standard and infrared pin functions scircr [iren] sccr1 [ensci] sccr2 [te] sccr2 [re] txd pin rxd pin 0 1 0 0 *hi-z input ignored, terminate externally 0 1 0 1 *hi-z input sampled, pin should idle high 0110 output sci, idle high input ignored, terminate externally 0111 output sci, idle high input sampled, pin should idle high 1 1 0 0 *hi-z input ignored, terminate externally 1 1 0 1 *hi-z input sampled, pin should idle high 1110 output ir, idle high input ignored, terminate externally 1111 output ir, idle high input sampled, pin should idle high x 0 x x hi-z input ignored, terminate externally * after completion of transmission in progress f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 198 infrared serial communications interface (irsci) motorola 12.10 i/o registers these i/o registers control and monitor sci operation: sci control register 1 (scc1) sci control register 2 (scc2) sci control register 3 (scc3) sci status register 1 (scs1) sci status register 2 (scs2) sci data register (scdr) sci baud rate register (scbr) sci infrared control register (scircr) 12.10.1 sci control register 1 sci control register 1: enables loop mode operation enables the sci controls output polarity controls character length controls sci wakeup method controls idle character detection enables parity function controls parity type f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 199 non-disclosure agreement required loops ?loop mode select bit this bit enables loop mode operation for the sci only. in loop mode the rxd pin is disconnected from the sci, and the transmitter output goes into the receiver input. both the transmitter and the receiver must be enabled to use loop mode. this bit does not affect the infrared encoder/decoder. 1 = loop mode enabled 0 = normal operation enabled ensci ?enable sci bit this bit enables the sci and the sci baud rate generator. clearing ensci sets the scte and tc bits in sci status register 1 and disables transmitter interrupts. 1 = sci enabled 0 = sci disabled m ?mode (character length) bit this bit determines whether sci characters are eight or nine bits long. (see table 12-5 .) the ninth bit can serve as an extra stop bit, as a receiver wakeup signal, or as a parity bit. 1 = 9-bit sci characters 0 = 8-bit sci characters wake ?wakeup condition bit this bit determines which condition wakes up the sci: a logic 1 (address mark) in the most significant bit position of a received character or an idle condition on the rxd pin. 1 = address mark wakeup 0 = idle line wakeup address: $0013 bit 7 654321 bit 0 read: loops ensci 0 m wake ilty pen pty write: reset: 00000000 = unimplemented figure 12-11. sci control register 1 (scc1) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 200 infrared serial communications interface (irsci) motorola ilty ?idle line type bit this bit determines when the sci starts counting logic 1s as idle character bits. the counting begins either after the start bit or after the stop bit. if the count begins after the start bit, then a string of logic 1s preceding the stop bit may cause false recognition of an idle character. beginning the count after the stop bit avoids false idle character recognition, but requires properly synchronized transmissions. 1 = idle character bit count begins after stop bit 0 = idle character bit count begins after start bit pen parity enable bit this bit enables the sci parity function. (see table 12-5 .) when enabled, the parity function inserts a parity bit in the most significant bit position. (see figure 12-5 .) 1 = parity function enabled 0 = parity function disabled pty ?parity bit this bit determines whether the sci generates and checks for odd parity or even parity. (see table 12-5 .) 1 = odd parity 0 = even parity note: changing the pty bit in the middle of a transmission or reception can generate a parity error. table 12-5. character format selection control bits character format m pen:pty start bits data bits parity stop bits character length 0 0x 1 8 none 1 10 bits 1 0x 1 9 none 1 11 bits 0 10 1 7 even 1 10 bits 0 11 1 7 odd 1 10 bits 1 10 1 8 even 1 11 bits 1 11 1 8 odd 1 11 bits f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 201 non-disclosure agreement required 12.10.2 sci control register 2 sci control register 2: enables the following cpu interrupt requests: enables the scte bit to generate transmitter interrupt requests enables the tc bit to generate transmitter interrupt requests enables the scrf bit to generate receiver interrupt requests enables the idle bit to generate receiver cpu interrupt requests enables the transmitter enables the receiver enables sci wakeup transmits sci break characters sctie ?sci transmit interrupt enable bit this bit enables the scte bit to generate sci transmitter interrupt requests. setting the sctie bit and clearing the dma transfer enable bit, dmate, in scc3 enables the scte bit to generate cpu interrupt requests. 1 = scte enabled to generate cpu interrupt if dmate is cleared 0 = scte not enabled to generate interrupt requests address: $0014 bit 7 654321 bit 0 read: sctie tcie scrie ilie te re rwu sbk write: reset: 00000000 figure 12-12. sci control register 2 (scc2) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 202 infrared serial communications interface (irsci) motorola tcie ?transmission complete interrupt enable bit this bit enables the tc bit to generate sci transmitter cpu interrupt requests. 1 = tc enabled to generate cpu interrupt requests 0 = tc not enabled to generate cpu interrupt requests scrie ?sci receive interrupt enable bit this read/write bit enables the scrf bit to generate sci receiver cpu interrupt requests or sci receiver dma service requests. setting the scrie bit and clearing the dma receive enable bit, dmare, in scc3 enables the scrf bit to generate cpu interrupt requests. 1 = scrf enabled to generate interrupt requests if dmate is cleared 0 = scrf not enabled to generate interrupt requests ilie ?idle line interrupt enable bit this read/write bit enables the idle bit to generate sci receiver cpu interrupt requests. 1 = idle enabled to generate cpu interrupt requests 0 = idle not enabled to generate cpu interrupt requests te ?transmitter enable bit setting this read/write bit begins the transmission by sending a preamble of 10 or 11 logic 1s from the transmit shift register to the txd pin. if software clears the te bit, the transmitter completes any transmission in progress before the txd returns to the high impedence state. clearing and then setting te during a transmission queues an idle character to be sent after the character currently being transmitted. 1 = transmitter enabled 0 = transmitter disabled note: writing to the te bit is not allowed when the enable sci bit (ensci) is clear. ensci is in sci control register 1. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 203 non-disclosure agreement required re ?receiver enable bit setting this bit enables the receiver. clearing the re bit disables the receiver but does not affect receiver interrupt flag bits. 1 = receiver enabled 0 = receiver disabled note: writing to the re bit is not allowed when the enable sci bit (ensci) is clear. ensci is in sci control register 1. rwu ?receiver wakeup bit this bit puts the receiver in a standby state during which receiver interrupts are disabled. the wake bit in scc1 determines whether an idle input or an address mark brings the receiver out of the standby state and clears the rwu bit. 1 = standby state 0 = normal operation sbk ?send break bit setting and then clearing this read/write bit transmits a break character followed by a logic 1. the logic 1 after the break character guarantees recognition of a valid start bit. if sbk remains set, the transmitter continuously transmits break characters with no logic 1s between them. 1 = transmit break characters 0 = no break characters being transmitted note: do not toggle the sbk bit immediately after setting the scte bit. toggling sbk too early causes the sci to send a break character instead of a preamble. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 204 infrared serial communications interface (irsci) motorola 12.10.3 sci control register 3 sci control register 3: stores the ninth sci data bit received and the ninth sci data bit to be transmitted enables these interrupts: receiver overrun interrupts noise error interrupts framing error interrupts parity error interrupts r8 ?received bit 8 when the sci is receiving 9-bit characters, r8 is the read-only ninth bit (bit 8) of the received character. r8 is received at the same time that the scdr receives the other eight bits. when the sci is receiving 8-bit characters, r8 is a copy of the eighth bit (bit 7). t8 ?transmitted bit 8 when the sci is transmitting 9-bit characters, t8 is the read/write ninth bit (bit 8) of the transmitted character. t8 is loaded into the transmit shift register at the same time that the scdr is loaded into the transmit shift register. address: $0015 bit 7 654321 bit 0 read: r8 t8 dmare dmate orie neie feie peie write: reset: u u 000000 = unimplemented u = unaffected figure 12-13. sci control register 3 (scc3) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 205 non-disclosure agreement required dmare ?dma receive enable bit this bit enables the dma to service sci receiver dma service requests generated by the scrf bit. (see 12.10.4 sci status register 1 .) setting the dmare bit disables sci receiver cpu interrupt requests. 1 = dma enabled to service sci receiver dma service requests generated by the scrf bit (sci receiver cpu interrupt requests disabled) 0 = dma not enabled to service sci receiver dma service requests generated by the scrf bit (sci receiver cpu interrupt requests enabled) caution: there is no dma on this device. this bit should be cleared. dmate ?dma transfer enable bit this bit enables sci transmitter empty (scte) dma service requests. (see 12.10.4 sci status register 1 .) setting the dmate bit disables scte cpu interrupt requests. 1 = scte dma service requests enabled (scte cpu interrupt requests disabled) 0 = scte dma service requests disabled (scte cpu interrupt requests enabled) caution: there is no dma on this device. this bit should be cleared. orie receiver overrun interrupt enable bit this bit enables sci error cpu interrupt requests generated by the receiver overrun bit, or. 1 = sci error cpu interrupt requests from or bit enabled 0 = sci error cpu interrupt requests from or bit disabled neie ?receiver noise error interrupt enable bit this bit enables sci error cpu interrupt requests generated by the noise error bit, ne. 1 = sci error cpu interrupt requests from ne bit enabled 0 = sci error cpu interrupt requests from ne bit disabled f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 206 infrared serial communications interface (irsci) motorola feie ?receiver framing error interrupt enable bit this bit enables sci error cpu interrupt requests generated by the framing error bit, fe. 1 = sci error cpu interrupt requests from fe bit enabled 0 = sci error cpu interrupt requests from fe bit disabled peie ?receiver parity error interrupt enable bit this bit enables sci receiver cpu interrupt requests generated by the parity error bit, pe. (see 12.10.4 sci status register 1 .) 1 = sci error cpu interrupt requests from pe bit enabled 0 = sci error cpu interrupt requests from pe bit disabled 12.10.4 sci status register 1 sci status register 1 contains flags to signal these conditions: transfer of scdr data to transmit shift register complete transmission complete transfer of receive shift register data to scdr complete receiver input idle receiver overrun noisy data framing error parity error address: $0016 bit 7 654321 bit 0 read: scte tc scrf idle or nf fe pe write: reset: 11000000 = unimplemented figure 12-14. sci status register 1 (scs1) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 207 non-disclosure agreement required scte ?sci transmitter empty bit this clearable, read-only bit is set when the scdr transfers a character to the transmit shift register. scte can generate an sci transmitter interrupt request. when the sctie bit in scc2 is set and the dmate bit in scc3 is clear, scte generates an sci transmitter cpu interrupt request. clear the scte bit by reading scs1 with scte set and then writing to scdr. 1 = scdr data transferred to transmit shift register 0 = scdr data not transferred to transmit shift register tc ?transmission complete bit this read-only bit is set when the scte bit is set, and no data, preamble, or break character is being transmitted. tc generates an sci transmitter cpu interrupt request if the tcie bit in scc2 is also set. tc is automatically cleared when data, preamble, or break is queued and ready to be sent. there may be up to 1.5 transmitter clocks of latency between queueing data, preamble, and break and the transmission actually starting. 1 = no transmission in progress 0 = transmission in progress scrf ?sci receiver full bit this clearable, read-only bit is set when the data in the receive shift register transfers to the sci data register. scrf can generate an sci receiver interrupt request. when the scrie bit in scc2 is set and the dmare bit in scc3 is clear, scrf generates a cpu interrupt request. clear the scrf bit by reading scs1 with scrf set and then reading the scdr. 1 = received data available in scdr 0 = data not available in scdr idle ?receiver idle bit this clearable, read-only bit is set when 10 or 11 consecutive logic 1s appear on the receiver input. idle generates an sci error cpu interrupt request if the ilie bit in scc2 is also set and the dmare bit in scc3 is clear. clear the idle bit by reading scs1 with idle set and then reading the scdr. after the receiver is enabled, it must receive a valid character that sets the scrf bit before an idle f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 208 infrared serial communications interface (irsci) motorola condition can set the idle bit. also, after the idle bit has been cleared, a valid character must again set the scrf bit before an idle condition can set the idle bit. 1 = receiver input idle 0 = receiver input active (or idle since the idle bit was cleared) or ?receiver overrun bit this clearable, read-only bit is set when software fails to read the scdr before the receive shift register receives the next character. the or bit generates an sci error cpu interrupt request if the orie bit in scc3 is also set. the data in the shift register is lost, but the data already in the scdr is not affected. clear the or bit by reading scs1 with or set and then reading the scdr. 1 = receive shift register full and scrf = 1 0 = no receiver overrun software latency may allow an overrun to occur between reads of scs1 and scdr in the flag-clearing sequence. figure 12-15 shows the normal flag-clearing sequence and an example of an overrun caused by a delayed flag-clearing sequence. the delayed read of scdr does not clear the or bit because or was not set when scs1 was read. byte 2 caused the overrun and is lost. the next flag- clearing sequence reads byte 3 in the scdr instead of byte 2. in applications that are subject to software latency or in which it is important to know which byte is lost due to an overrun, the flag- clearing routine can check the or bit in a second read of scs1 after reading the data register. nf ?receiver noise flag bit this clearable, read-only bit is set when the sci detects noise on the rxd pin. nf generates an nf cpu interrupt request if the neie bit in scc3 is also set. clear the nf bit by reading scs1 and then reading the scdr. 1 = noise detected 0 = no noise detected f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 209 non-disclosure agreement required figure 12-15. flag clearing sequence fe ?receiver framing error bit this clearable, read-only bit is set when a logic 0 is accepted as the stop bit. fe generates an sci error cpu interrupt request if the feie bit in scc3 also is set. clear the fe bit by reading scs1 with fe set and then reading the scdr. 1 = framing error detected 0 = no framing error detected pe ?receiver parity error bit this clearable, read-only bit is set when the sci detects a parity error in incoming data. pe generates a pe cpu interrupt request if the peie bit in scc3 is also set. clear the pe bit by reading scs1 with pe set and then reading the scdr. 1 = parity error detected 0 = no parity error detected byte 1 normal flag clearing sequence read scs1 scrf = 1 read scdr (byte 1) scrf = 1 scrf = 1 byte 2 byte 3 byte 4 or = 0 read scs1 scrf = 1 or = 0 read scdr (byte 2) scrf = 0 read scs1 scrf = 1 or = 0 scrf = 1 scrf = 0 read scdr (byte 3) scrf = 0 byte 1 read scs1 scrf = 1 read scdr (byte 1) scrf = 1 scrf = 1 byte 2 byte 3 byte 4 or = 0 read scs1 scrf = 1 or = 1 read scdr (byte 3) delayed flag clearing sequence or = 1 scrf = 1 or = 1 scrf = 0 or = 1 scrf = 0 or = 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 210 infrared serial communications interface (irsci) motorola 12.10.5 sci status register 2 sci status register 2 contains flags to signal the following conditions: break character detected incoming data bkf ?break flag bit this clearable, read-only bit is set when the sci detects a break character on the rxd pin. in scs1, the fe and scrf bits are also set. in 9-bit character transmissions, the r8 bit in scc3 is cleared. bkf does not generate an interrupt request. clear bkf by reading scs2 with bkf set and then reading the scdr. once cleared, bkf can become set again only after logic 1s again appear on the rxd pin followed by another break character. 1 = break character detected 0 = no break character detected rpf ?eception-in-progress flag bit this bit is set when the receiver detects a logic 0 during the rt1 time period of the start bit search. rpf does not generate an interrupt request. rpf is reset after the receiver detects false start bits (usually from noise or a baud rate mismatch, or when the receiver detects an idle character. polling rpf before disabling the sci module or entering stop mode can show whether a reception is in progress. 1 = reception in progress 0 = no reception in progress address: $0017 bit 7 654321 bit 0 read: bkf rpf write: reset: 00000000 = unimplemented figure 12-16. sci status register 2 (scs2) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 211 non-disclosure agreement required 12.10.6 sci data register the sci data register is the buffer between the internal data bus and the receive and transmit shift registers. reset has no effect on data in the sci data register. r7/t7?0/t0 ?receive/transmit data bits reading the scdr accesses the read-only received data bits, r7?0. writing to the scdr writes the data to be transmitted, t7?0. 12.10.7 sci baud rate register the baud rate register selects the baud rate for both the receiver and the transmitter. scr2?cr0 sci baud rate select bits these read/write bits select the sci baud rate divisor as shown in table 12-6 . caution: for proper sci function, the bus clock (cgmout 2) must be programmed to at least 32 times that of sci baud rate. address: $0018 bit 7 654321 bit 0 read: r7 r6 r5 r4 r3 r2 r1 r0 write: t7 t6 t5 t4 t3 t2 t1 t0 reset: unaffected by reset figure 12-17. sci data register (scdr) address: $0019 bit 7 654321 bit 0 read: 00000 scr2 scr1 scr0 write: reset: 00000000 = unimplemented figure 12-18. sci baud rate register (scbr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 212 infrared serial communications interface (irsci) motorola use the following formula to calculate the sci baud rate: where: cgmout 2 = bus frequency bd = baud rate divisor table 12-7 shows the sci baud rates that can be generated with a 307.2-khz input clock. caution: do not select 1/32 transmission (tnp1:0 = 11/10) for the highest baud rate (scr2:0 = 000). a 32x clock is not available under these conditions. table 12-6. sci baud rate selection scr2:1:0 baud rate divisor (bd) 000 1 001 2 010 4 011 8 100 16 101 32 110 64 111 128 table 12-7. sci baud rate selection examples scr2:1:0 baud rate divisor (bd) baud rate (cgmout 2 = 307.2 khz) 000 1 19,200 001 2 9600 010 4 4800 011 8 2400 100 16 1200 101 32 600 110 64 300 111 128 150 baud rate = cgmout 2 16 x bd f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
infrared serial communications interface (irsci) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola infrared serial communications interface (irsci) 213 non-disclosure agreement required 12.10.8 sci infrared control register the infrared control register is a read/write register containing the control bits for the infrared submodule. the iren bit has to be set for any of the other bits can operate. the configuration of this register in reset is shown in figure 12-19 . tnp1 and tnp0 ?transmitter narrow pulse bits these bits enable whether the sci transmits a 1/16, 3/16, or 1/32 narrow pulse. 11 = sci transmits a 1/32 narrow pulse. 10 = sci transmits a 1/32 narrow pulse. 01 = sci transmits a 1/16 narrow pulse. 00 = sci transmits a 3/16 narrow pulse. iren ?ir enable bit this bit enables the entire infrared submodule. when this bit is clear, the ir is disabled. 1 = ir enabled 0 = ir disabled address: $001e bit 7 654321 bit 0 read: 00000 tnp1 tnp0 iren write: reset: 00000000 = unimplemented figure 12-19. sci infrared control register (scircr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required infrared serial communications interface (irsci) advance information mc68hc(9)08lk60 rev. 1.0 214 infrared serial communications interface (irsci) motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 215 non-disclosure agreement required advance information mc68hc(9)08lk60 section 13. serial peripheral interface module (spi) 13.1 contents 13.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216 13.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216 13.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217 13.4.1 master mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219 13.5 slave mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220 13.6 transmission formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221 13.6.1 clock phase and polarity controls . . . . . . . . . . . . . . . . . .221 13.6.2 transmission format when cpha = 0 . . . . . . . . . . . . . . .222 13.6.3 transmission format when cpha = 1 . . . . . . . . . . . . . . .224 13.6.4 transmission initiation latency . . . . . . . . . . . . . . . . . . . . .225 13.7 queuing transmission data . . . . . . . . . . . . . . . . . . . . . . . . . .227 13.8 error conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228 13.8.1 overflow error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228 13.8.2 mode fault error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231 13.9 interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233 13.10 resetting the spi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235 13.11 wait mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236 13.12 spi during break interrupts . . . . . . . . . . . . . . . . . . . . . . . . . .236 13.13 i/o signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237 13.13.1 master in/slave out (miso) . . . . . . . . . . . . . . . . . . . . . . .237 13.13.2 master out/slave in (mosi) . . . . . . . . . . . . . . . . . . . . . . .238 13.13.3 serial clock (spsck) . . . . . . . . . . . . . . . . . . . . . . . . . . . .238 13.13.4 slave select ( ss) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238 13.13.5 clock ground (ev ss ) . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 13.14 i/o registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 13.14.1 spi control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 13.14.2 spi status and control register . . . . . . . . . . . . . . . . . . .243 13.14.3 spi data register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 216 serial peripheral interface module (spi) motorola 13.2 introduction this section describes the serial peripheral interface (spi) module which allows full-duplex, synchronous, serial communications with peripheral devices. note: references to dma and associated functions are only valid if the mcu has a dma module. this mcu does not have the dma function. any dma-related register bits should be left in their reset state for normal mcu operation. 13.3 features features of the spi module include: full-duplex operation master and slave modes double-buffered operation with separate transmit and receive registers four master mode frequencies (maximum = bus frequency 2) maximum slave mode frequency = bus frequency clock ground for reduced radio frequency (rf) interference serial clock with programmable polarity and phase two separately enabled interrupts: sprf (spi receiver full) spte (spi transmitter empty) mode fault error flag with cpu interrupt capability overflow error flag with cpu interrupt capability programmable wired-or mode ? 2 c (inter-integrated circuit) compatibility f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 217 non-disclosure agreement required 13.4 functional description figure 13-1 shows the locations and contents of the spi input/output (i/o) registers and figure 13-2 shows the structure of the spi module. the spi module allows full-duplex, synchronous, serial communication among the mcu and peripheral devices, including other mcus. software can poll the spi status flags or spi operation can be interrupt- driven. the following paragraphs describe the operation of the spi module. addr. register name bit 7 6 5 4321 bit 0 $000d spi control register (spcr) read: sprie dmas spmstr cpol cpha spwom spe sptie write: reset: 0 0 1 01000 $000e spi status and control register (spscr) read: sprf errie ovrf modf spte modfen spr1 spr0 write: reset: 0 0 0 01000 $000f spi data register (spdr) read: r7 r6 r5 r4 r3 r2 r1 r0 write: t7 t6 t5 t4 t3 t2 t1 t0 reset: indeterminate after reset = unimplemented figure 13-1. spi i/o register summary f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 218 serial peripheral interface module (spi) motorola figure 13-2. spi module block diagram transmitter cpu interrupt request receiver/error cpu interrupt request 76543210 spr1 spmstr transmit data register shift register spr0 cgmout 2 clock select 2 clock divider 8 32 128 clock logic cpha cpol spi sprie dmas spe spwom sprf spte ovrf m s pin control logic receive data register sptie spe internal bus from sim modfen errie control modf spmstr mosi miso spsck ss f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 219 non-disclosure agreement required 13.4.1 master mode the spi operates in master mode when the spi master bit, spmstr, is set. note: configure the spi modules as master or slave before enabling them. enable the master spi before enabling the slave spi. disable the slave spi before disabling the master spi. (see 13.14.1 spi control register .) only a master spi module can initiate transmissions. software begins the transmission from a master spi module by writing to the transmit data register. if the shift register is empty, the byte immediately transfers to the shift register, setting the spi transmitter empty bit, spte. the byte begins shifting out on the mosi pin under the control of the serial clock. (see figure 13-3 .) the spr1 and spr0 bits control the baud rate generator and determine the speed of the shift register. (see 13.14.2 spi status and control register .) through the spsck pin, the baud rate generator of the master also controls the shift register of the slave peripheral. as the byte shifts out on the mosi pin of the master, another byte shifts in from the slave on the master? miso pin. the transmission ends when the receiver full bit, sprf, becomes set. at the same time that sprf becomes set, the byte from the slave transfers to the receive data register. in normal operation, sprf signals the end of a transmission. software clears sprf by reading the spi status and control register with sprf set and then reading the spi data register. writing to the spi data register clears the spte bit. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 220 serial peripheral interface module (spi) motorola figure 13-3. full-duplex master-slave connections 13.5 slave mode the spi operates in slave mode when the spmstr bit is clear. in slave mode, the spsck pin is the input for the serial clock from the master mcu. before a data transmission occurs, the ss pin of the slave spi must be at logic 0. ss must remain low until the transmission is complete. (see 13.8.2 mode fault error .) in a slave spi module, data enters the shift register under the control of the serial clock from the master spi module. after a byte enters the shift register of a slave spi, it transfers to the receive data register, and the sprf bit is set. to prevent an overflow condition, slave software then must read the receive data register before another full byte enters the shift register. the maximum frequency of the spsck for an spi configured as a slave is the bus clock speed (which is twice as fast as the fastest master spsck clock that can be generated). the frequency of the spsck for an spi configured as a slave does not have to correspond to any spi baud rate. the baud rate only controls the speed of the spsck generated by an spi configured as a master. therefore, the frequency of the spsck for an spi configured as a slave can be any frequency less than or equal to the bus speed. when the master spi starts a transmission, the data in the slave shift register begins shifting out on the miso pin. the slave can load its shift shift register shift register baud rate generator master mcu slave mcu v dd mosi mosi miso miso spsck spsck ss ss f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) transmission formats mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 221 non-disclosure agreement required register with a new byte for the next transmission by writing to its transmit data register. the slave must write to its transmit data register at least one bus cycle before the master starts the next transmission. otherwise, the byte already in the slave shift register shifts out on the miso pin. data written to the slave shift register during a transmission remains in a buffer until the end of the transmission. when the clock phase bit (cpha) is set, the first edge of spsck starts a transmission. when cpha is clear, the falling edge of ss starts a transmission. (see 13.6 transmission formats .) note: spsck must be in the proper idle state before the slave is enabled to prevent spsck from appearing as a clock edge. 13.6 transmission formats during an spi transmission, data is simultaneously transmitted (shifted out serially) and received (shifted in serially). a serial clock synchronizes shifting and sampling on the two serial data lines. a slave select line allows selection of an individual slave spi device; slave devices that are not selected do not interfere with spi bus activities. on a master spi device, the slave select line can be optionally used to indicate multiple- master bus contention. 13.6.1 clock phase and polarity controls software can select any of four combinations of serial clock (spsck) phase and polarity using two bits in the spi control register (spcr). the clock polarity is specified by the cpol control bit, which selects an active high or low clock and has no significant effect on the transmission format. the clock phase (cpha) control bit selects one of two fundamentally different transmission formats. the clock phase and polarity should be identical for the master spi device and the communicating slave device. in some cases, the phase and polarity are changed between transmissions to allow a master device to communicate with peripheral slaves having different requirements. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 222 serial peripheral interface module (spi) motorola note: before writing to the cpol bit or the cpha bit, disable the spi by clearing the spi enable bit (spe). 13.6.2 transmission format when cpha = 0 figure 13-4 shows an spi transmission in which cpha is logic 0. the figure should not be used as a replacement for data sheet parametric information. two waveforms are shown for spsck: one for cpol = 0 and another for cpol = 1. the diagram may be interpreted as a master or slave timing diagram since the serial clock (spsck), master in/slave out (miso), and master out/slave in (mosi) pins are directly connected between the master and the slave. the miso signal is the output from the slave, and the mosi signal is the output from the master. the ss line is the slave select input to the slave. the slave spi drives its miso output only when its slave select input ( ss) is at logic 0, so that only the selected slave drives to the master. the ss pin of the master is not shown but is assumed to be inactive. the ss pin of the master must be high or must be reconfigured as general-purpose i/o not affecting the spi. (see 13.8.2 mode fault error .) when cpha = 0, the first spsck edge is the msb capture strobe. therefore the slave must begin driving its data before the first spsck edge, and a falling edge on the ss pin is used to start the slave data transmission. the slave? ss pin must be toggled back to high and then low again between each byte transmitted as shown in figure 13-5 . note: the ss pin on this device cannot be configured as a general-purpose i/o. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) transmission formats mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 223 non-disclosure agreement required figure 13-4. transmission format (cpha = 0) figure 13-5. cpha/ ss timing when cpha = 0 for a slave, the falling edge of ss indicates the beginning of the transmission. this causes the spi to leave its idle state and begin driving the miso pin with the msb of its data. once the transmission begins, no new data is allowed into the shift register from the transmit data register. therefore, the spi data register of the slave must be loaded with transmit data before the falling edge of ss. any data written after the falling edge is stored in the transmit data register and transferred to the shift register after the current transmission. bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 lsb msb bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 lsb msb 1234 5678 spsck cycle # for reference spsck; cpol = 0 spsck; cpol = 1 mosi from master miso from slave ss; to slave capture strobe byte 1 byte 3 miso/mosi byte 2 master ss slave ss cpha = 0 slave ss cpha = 1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 224 serial peripheral interface module (spi) motorola 13.6.3 transmission format when cpha = 1 figure 13-6 shows an spi transmission in which cpha is logic 1. the figure should not be used as a replacement for data sheet parametric information. two waveforms are shown for spsck: one for cpol = 0 and another for cpol = 1. the diagram may be interpreted as a master or slave timing diagram since the serial clock (spsck), master in/slave out (miso), and master out/slave in (mosi) pins are directly connected between the master and the slave. the miso signal is the output from the slave, and the mosi signal is the output from the master. the ss line is the slave select input to the slave. the slave spi drives its miso output only when its slave select input ( ss) is at logic 0, so that only the selected slave drives to the master. the ss pin of the master is not shown but is assumed to be inactive. the ss pin of the master must be high or must be reconfigured as general-purpose i/o not affecting the spi. (see 13.8.2 mode fault error .) when cpha = 1, the master begins driving its mosi pin on the first spsck edge. therefore, the slave uses the first spsck edge as a start transmission signal. the ss pin can remain low between transmissions. this format may be preferable in systems having only one master and only one slave driving the miso data line. note: the ss pin on this device cannot be configured as a general-purpose i/o. figure 13-6. transmission format (cpha = 1) bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 lsb msb bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 lsb msb 1234 5678 spsck cycle # for reference spsck; cpol = 0 spsck; cpol =1 mosi from master miso from slave ss; to slave capture strobe f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) transmission formats mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 225 non-disclosure agreement required when cpha = 1 for a slave, the first edge of the spsck indicates the beginning of the transmission. this causes the spi to leave its idle state and begin driving the miso pin with the msb of its data. once the transmission begins, no new data is allowed into the shift register from the transmit data register. therefore, the spi data register of the slave must be loaded with transmit data before the first edge of spsck. any data written after the first edge is stored in the transmit data register and transferred to the shift register after the current transmission. 13.6.4 transmission initiation latency when the spi is configured as a master (spmstr = 1), writing to the spdr starts a transmission. cpha has no effect on the delay to the start of the transmission, but it does affect the initial state of the spsck signal. when cpha = 0, the spsck signal remains inactive for the first half of the first spsck cycle. when cpha = 1, the first spsck cycle begins with an edge on the spsck line from its inactive to its active level. the spi clock rate (selected by spr1:spr0) affects the delay from the write to spdr and the start of the spi transmission. (see figure 13-7 .) the internal spi clock in the master is a free-running derivative of the internal mcu clock. to conserve power, it is enabled only when both the spe and spmstr bits are set. spsck edges occur halfway through the low time of the internal mcu clock. since the spi clock is free-running, it is uncertain where the write to the spdr occurs relative to the slower spsck. this uncertainty causes the variation in the initiation delay shown in figure 13-7 . this delay is no longer than a single spi bit time. that is, the maximum delay is two mcu bus cycles for div2, eight mcu bus cycles for div8, 32 mcu bus cycles for div32, and 128 mcu bus cycles for div128. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 226 serial peripheral interface module (spi) motorola figure 13-7. transmission start delay (master) write to spdr initiation delay bus mosi spsck cpha = 1 spsck cpha = 0 spsck cycle number msb bit 6 12 clock write to spdr earliest latest spsck = internal clock 2; earliest latest 2 possible start points spsck = internal clock 8; 8 possible start points earliest latest spsck = internal clock 32; 32 possible start points earliest latest spsck = internal clock 128; 128 possible start points write to spdr write to spdr write to spdr bus clock bit 5 3 bus clock bus clock bus clock ? ? ? initiation delay from write spdr to transfer begin f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) queuing transmission data mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 227 non-disclosure agreement required 13.7 queuing transmission data the double-buffered transmit data register allows a data byte to be queued and transmitted. for an spi configured as a master, a queued data byte is transmitted immediately after the previous transmission has completed. the spi transmitter empty flag (spte) indicates when the transmit data buffer is ready to accept new data. write to the transmit data register only when the spte bit is high. figure 13-8 shows the timing associated with doing back-to-back transmissions with the spi (spsck has cpha: cpol = 1:0). figure 13-8. sprf/spte cpu interrupt timing bit 3 mosi spsck; cpha:cpol = 1:0 spte write to spdr 1 cpu writes byte 2 to spdr, queueing cpu writes byte 1 to spdr, clearing byte 1 transfers from transmit data 3 1 2 2 3 5 spte bit. register to shift register, setting spte bit. sprf read spscr msb bit 6 bit 5 bit 4 bit 2 bit 1 lsb msb bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 lsb msb bit 6 byte 2 transfers from transmit data cpu writes byte 3 to spdr, queueing byte 3 transfers from transmit data 5 8 10 8 10 4 first incoming byte transfers from shift 6 cpu reads spscr with sprf bit set. 4 6 9 second incoming byte transfers from shift 9 11 byte 2 and clearing spte bit. register to shift register, setting spte bit. register to receive data register, setting sprf bit. byte 3 and clearing spte bit. register to shift register, setting spte bit. register to receive data register, setting sprf bit. 12 cpu reads spdr, clearing sprf bit. bit 5 bit 4 byte 1 byte 2 byte 3 7 12 read spdr 7 cpu reads spdr, clearing sprf bit. 11 cpu reads spscr with sprf bit set. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 228 serial peripheral interface module (spi) motorola the transmit data buffer allows back-to-back transmissions without the slave precisely timing its writes between transmissions as in a system with a single data buffer. also, if no new data is written to the data buffer, the last value contained in the shift register is the next data word to be transmitted. for an idle master or idle slave that has no data loaded into its transmit buffer, the spte is set again no more than two bus cycles after the transmit buffer empties into the shift register. this allows the user to queue up a 16-bit value to send. for an already active slave, the load of the shift register cannot occur until the transmission is completed. this implies that a back-to-back write to the transmit data register is not possible. the spte indicates when the next write can occur. 13.8 error conditions these flags signal spi error conditions: overflow (ovrf) ?failing to read the spi data register before the next full byte enters the shift register sets the ovrf bit. the new byte does not transfer to the receive data register, and the unread byte still can be read. ovrf is in the spi status and control register. mode fault error (modf) ?the modf bit indicates that the voltage on the slave select pin ( ss) is inconsistent with the mode of the spi. modf is in the spi status and control register. 13.8.1 overflow error the overflow flag (ovrf) becomes set if the receive data register still has unread data from a previous transmission when the capture strobe of bit 1 of the next transmission occurs. the bit 1 capture strobe occurs in the middle of spsck cycle 7. (see figure 13-4 and figure 13-6 .) if an overflow occurs, all data received after the overflow and before the ovrf bit is cleared does not transfer to the receive data register and does not set the spi receiver full bit (sprf). the unread data that transferred to the receive data register before the overflow occurred can f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) error conditions mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 229 non-disclosure agreement required still be read. therefore, an overflow error always indicates the loss of data. clear the overflow flag by reading the spi status and control register and then reading the spi data register. ovrf generates a receiver/error cpu interrupt request if the error interrupt enable bit (errie) is also set. the sprf, modf, and ovrf interrupts share the same cpu interrupt vector. it is not possible to enable modf or ovrf individually to generate a receiver/error cpu interrupt request. however, leaving modfen low prevents modf from being set. if the cpu sprf interrupt is enabled and the ovrf interrupt is not, watch for an overflow condition. figure 13-9 shows how it is possible to miss an overflow. the first part of figure 13-9 shows how it is possible to read the spscr and spdr to clear the sprf without problems. however, as illustrated by the second transmission example, the ovrf bit can be set in between the time that spscr and spdr are read. figure 13-9. missed read of overflow condition read spdr read spscr ovrf sprf byte 1 byte 2 byte 3 byte 4 byte 1 sets sprf bit. cpu reads spscr with sprf bit set cpu reads byte 1 in spdr, byte 2 sets sprf bit. cpu reads spscr with sprf bit set byte 3 sets ovrf bit. byte 3 is lost. cpu reads byte 2 in spdr, clearing sprf bit, byte 4 fails to set sprf bit because 1 1 2 3 4 5 6 7 8 2 3 4 5 6 7 8 clearing sprf bit. but not ovrf bit. ovrf bit is not cleared. byte 4 is lost. and ovrf bit clear. and ovrf bit clear. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 230 serial peripheral interface module (spi) motorola in this case, an overflow can easily be missed. since no more sprf interrupts can be generated until this ovrf is serviced, it is not obvious that bytes are being lost as more transmissions are completed. to prevent this, either enable the ovrf interrupt or do another read of the spscr following the read of the spdr. this ensures that the ovrf was not set before the sprf was cleared and that future transmissions can set the sprf bit. figure 13-10 illustrates this process. generally, to avoid this second spscr read, enable the ovrf to the cpu by setting the errie bit. figure 13-10. clearing sprf when ovrf interrupt is not enabled read spdr read spscr ovrf sprf byte 1 byte 2 byte 3 byte 4 1 byte 1 sets sprf bit. cpu reads spscr with sprf bit set cpu reads byte 1 in spdr, cpu reads spscr again byte 2 sets sprf bit. cpu reads spscr with sprf bit set byte 3 sets ovrf bit. byte 3 is lost. cpu reads byte 2 in spdr, cpu reads spscr again cpu reads byte 2 spdr, byte 4 sets sprf bit. cpu reads spscr. cpu reads byte 4 in spdr, cpu reads spscr again 1 2 3 clearing sprf bit. 4 to check ovrf bit. 5 6 7 8 9 clearing sprf bit. to check ovrf bit. 10 clearing ovrf bit. 11 12 13 14 2 3 4 5 6 7 8 9 10 11 12 13 14 clearing sprf bit. to check ovrf bit. spi receive complete and ovrf bit clear. and ovrf bit clear. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) error conditions mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 231 non-disclosure agreement required 13.8.2 mode fault error setting the spmstr bit selects master mode and configures the spsck and mosi pins as outputs and the miso pin as an input. clearing spmstr selects slave mode and configures the spsck and mosi pins as inputs and the miso pin as an output. the mode fault bit, modf, becomes set any time the state of the slave select pin, ss, is inconsistent with the mode selected by spmstr. to prevent spi pin contention and damage to the mcu, a mode fault error occurs if: the ss pin of a slave spi goes high during a transmission. the ss pin of a master spi goes low at any time. for the modf flag to be set, the mode fault error enable bit (modfen) must be set. clearing the modfen bit does not clear the modf flag but does prevent modf from being set again after modf is cleared. modf generates a receiver/error cpu interrupt request if the error interrupt enable bit (errie) is also set. the sprf, modf, and ovrf interrupts share the same cpu interrupt vector. it is not possible to enable modf or ovrf individually to generate a receiver/error cpu interrupt request. however, leaving modfen low prevents modf from being set. in a master spi with the mode fault enable bit (modfen) set, the mode fault flag (modf) is set if ss goes to logic 0. a mode fault in a master spi causes the following events to occur: if errie = 1, the spi generates an spi receiver/error cpu interrupt request. the spe bit is cleared. the spte bit is set. the spi state counter is cleared. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 232 serial peripheral interface module (spi) motorola when configured as a slave (spmstr = 0), the modf flag is set if ss goes high during a transmission. when cpha = 0, a transmission begins when ss goes low and ends once the incoming spsck goes back to its idle level following the shift of the eighth data bit. when cpha = 1, the transmission begins when the spsck leaves its idle level and ss is already low. the transmission continues until the spsck returns to its idle level following the shift of the last data bit. (see 13.6 transmission formats .) note: setting the modf flag does not clear the spmstr bit. the spmstr bit has no function when spe = 0. reading spmstr when modf = 1 shows the difference between a modf occurring when the spi is a master and when it is a slave. note: when cpha = 0, a modf occurs if a slave is selected ( ss is at logic 0) and later unselected ( ss is at logic 1) even if no spsck is sent to that slave. this happens because ss at logic 0 indicates the start of the transmission (miso driven out with the value of msb) for cpha = 0. when cpha = 1, a slave can be selected and then later unselected with no transmission occurring. therefore, modf does not occur since a transmission was never begun. in a slave spi (mstr = 0), the modf bit generates an spi receiver/error cpu interrupt request if the errie bit is set. the modf bit does not clear the spe bit or reset the spi in any way. software can abort the spi transmission by clearing the spe bit of the slave. note: a logic 1 voltage on the ss pin of a slave spi puts the miso pin in a high impedance state. also, the slave spi ignores all incoming spsck clocks, even if it was already in the middle of a transmission. to clear the modf flag, read the spscr with the modf bit set and then write to the spcr register. this entire clearing mechanism must occur with no modf condition existing or else the flag is not cleared. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) interrupts mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 233 non-disclosure agreement required 13.9 interrupts the four spi status flags that can be enabled to generate cpu interrupt requests are discussed in table 13-1 . reading the spi status and control register with sprf set and then reading the receive data register clears sprf. the clearing mechanism for the spte flag is always just a write to the transmit data register. the spi transmitter interrupt enable bit (sptie) enables the spte flag to generate transmitter interrupt requests provided that the spi is enabled (spe = 1). the spi receiver interrupt enable bit (sprie) enables the sprf bit to generate receiver interrupt requests regardless of the state of the spe bit. (see figure 13-11 .) the error interrupt enable bit (errie) enables both the modf and ovrf bits to generate a receiver/error cpu interrupt request. the mode fault enable bit (modfen) can prevent the modf flag from being set so that only the ovrf bit is enabled by the errie bit to generate receiver/error cpu interrupt requests. table 13-1. spi interrupts flag request spte transmitter empty spi transmitter cpu interrupt request (dmas = 0, sptie = 1, spe = 1) sprf receiver full spi receiver cpu interrupt request (dmas = 0, sprie = 1) ovrf over?w spi receiver/error interrupt request (errie = 1) modf mode fault spi receiver/error interrupt request (errie = 1) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 234 serial peripheral interface module (spi) motorola figure 13-11. spi interrupt request generation these sources in the spi status and control register can generate interrupt requests: spi receiver full bit (sprf) ?the sprf bit becomes set every time a byte transfers from the shift register to the receive data register. if the spi receiver interrupt enable bit, sprie, is also set, sprf generates an spi receiver/error cpu interrupt request. spi transmitter empty (spte) the spte bit becomes set every time a byte transfers from the transmit data register to the shift register. if the spi transmit interrupt enable bit, sptie, is also set, spte generates an spte cpu interrupt request or an spte dma service request. not available spte sptie sprf sprie dmas errie modf ovrf spe spi transmitter cpu interrupt request not available spi receiver/error cpu interrupt request f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) resetting the spi mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 235 non-disclosure agreement required 13.10 resetting the spi any system reset completely resets the spi. partial resets occur whenever the spi enable bit (spe) is low. whenever spe is low, the following occurs: the spte flag is set. any transmission currently in progress is aborted. the shift register is cleared. the spi state counter is cleared, making it ready for a new complete transmission. these items are reset only by a system reset: all control bits in the spcr register all control bits in the spscr register (modfen, errie, spr1, and spr0) the status flags sprf, ovrf, and modf by not resetting the control bits when spe is low, the user can clear spe between transmissions without having to set all control bits again when spe is set back high for the next transmission. by not resetting the sprf, ovrf, and modf flags, the user can still service these interrupts after the spi has been disabled. the user can disable the spi by writing 0 to the spe bit. the spi can also be disabled by a mode fault occurring in an spi that was configured as a master with the modfen bit set. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 236 serial peripheral interface module (spi) motorola 13.11 wait mode the spi module remains active after the execution of a wait instruction. in wait mode, the spi module registers are not accessible by the cpu. any enabled cpu interrupt request from the spi module can bring the mcu out of wait mode. if spi module functions are not required during wait mode, reduce power consumption by disabling the spi module before executing the wait instruction. 13.12 spi during break interrupts the system integration module (sim) controls whether status bits in other modules can be cleared during the break state. the bcfe bit in the sim break flag control register (sbfcr) enables software to clear status bits during the break state. (see 6.8.3 sim break flag control register .) to allow software to clear status bits during a break interrupt, write a logic 1 to the bcfe bit. if a status bit is cleared during the break state, it remains cleared when the mcu exits the break state. to protect status bits during the break state, write a logic 0 to the bcfe bit. with bcfe at logic 0 (its default state), software can read and write i/o registers during the break state without affecting status bits. some status bits have a 2-step read/write clearing procedure. if software does the first step on such a bit before the break, the bit cannot change during the break state as long as bcfe is at logic 0. after the break, doing the second step clears the status bit. since the spte bit cannot be cleared during a break with the bcfe bit cleared, a write to the transmit data register in break mode does not initiate a transmission nor is this data transferred into the shift register. therefore, a write to the spdr in break mode with the bcfe bit cleared has no effect. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) i/o signals mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 237 non-disclosure agreement required 13.13 i/o signals the spi module has five dedicated i/o pins. miso ?data received mosi ?data transmitted spsck ?serial clock ss ?slave select ?v ss ?clock ground the spi has limited inter-integrated circuit (i 2 c) capability (requiring software support) as a master in a single-master environment. to communicate with i 2 c peripherals, mosi becomes an open-drain output when the spwom bit in the spi control register is set. in i 2 c communication, the mosi and miso pins are connected to a bidirectional pin from the i 2 c peripheral and through a pullup resistor to v dd . 13.13.1 master in/slave out (miso) miso is one of the two spi module pins that transmits serial data. in full- duplex operation, the miso pin of the master spi module is connected to the miso pin of the slave spi module. the master spi simultaneously receives data on its miso pin and transmits data from its mosi pin. slave output data on the miso pin is enabled only when the spi is configured as a slave. the spi is configured as a slave when its spmstr bit is logic 0 and its ss pin is at logic 0. to support a multiple- slave system, a logic 1 on the ss pin puts the miso pin in a high- impedance state. when enabled, the spi controls data direction of the miso pin regardless of the state of the data direction register of the shared i/o port. note: the miso pin on this device is not shared with an i/o port. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 238 serial peripheral interface module (spi) motorola 13.13.2 master out/slave in (mosi) mosi is one of the two spi module pins that transmits serial data. in full duplex operation, the mosi pin of the master spi module is connected to the mosi pin of the slave spi module. the master spi simultaneously transmits data from its mosi pin and receives data on its miso pin. when enabled, the spi controls data direction of the mosi pin regardless of the state of the data direction register of the shared i/o port. note: the mosi pin on this device is not shared with an i/o port. 13.13.3 serial clock (spsck) the serial clock synchronizes data transmission between master and slave devices. in a master mcu, the spsck pin is the clock output. in a slave mcu, the spsck pin is the clock input. in full-duplex operation, the master and slave mcus exchange a byte of data in eight serial clock cycles. when enabled, the spi controls data direction of the spsck pin regardless of the state of the data direction register of the shared i/o port. note: the spsck pin on this device is not shared with an i/o port. 13.13.4 slave select ( ss) the ss pin has various functions depending on the current state of the spi. for an spi configured as a slave, the ss is used to select a slave. for cpha = 0, the ss is used to define the start of a transmission. (see 13.6 transmission formats .) since it is used to indicate the start of a transmission, the ss must be toggled high and low between each byte transmitted for the cpha = 0 format. however, it can remain low between transmissions for the cpha = 1 format. see figure 13-12 . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) i/o signals mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 239 non-disclosure agreement required figure 13-12. cpha/ ss timing when an spi is configured as a slave, the ss pin is always configured as an input. it cannot be used as a general -purpose i/o regardless of the state of the modfen control bit. however, the modfen bit can still prevent the state of the ss from creating a modf error. (see 13.14.2 spi status and control register .) note: a logic 1 voltage on the ss pin of a slave spi puts the miso pin in a high- impedance state. the slave spi ignores all incoming spsck clocks, even if it was already in the middle of a transmission. when an spi is configured as a master, the ss input can be used in conjunction with the modf flag to prevent multiple masters from driving mosi and spsck. (see 13.8.2 mode fault error .) for the state of the ss pin to set the modf flag, the modfen bit in the spsck register must be set. if the modfen bit is low for an spi master, the ss pin can be used as a general-purpose i/o under the control of the data direction register of the shared i/o port. with modfen high, it is an input-only pin to the spi regardless of the state of the data direction register of the shared i/o port. note: the ss pin on this device cannot be used as a general-purpose i/o. byte 1 byte 3 miso/mosi byte 2 master ss slave ss cpha = 0 slave ss cpha = 1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 240 serial peripheral interface module (spi) motorola the cpu can always read the state of the ss pin by configuring the appropriate pin as an input and reading the port data register. (see table 13-2 .) 13.13.5 clock ground (ev ss ) ev ss is the ground return for the serial clock pin, spsck, and the ground for the port output buffers. 13.14 i/o registers three registers control and monitor spi operation: spi control register (spcr) spi status and control register (spscr) spi data register (spdr) 13.14.1 spi control register the spi control register: enables spi module interrupt requests selects cpu interrupt requests configures the spi module as master or slave selects serial clock polarity and phase table 13-2. spi con?uration spe spmstr modfen spi configuration state of ss logic 0x (1) 1. x = don? care x not enabled general-purpose i/o; ss ignored by spi 1 0 x slave input-only to spi 1 1 0 master without modf general-purpose i/o; ss ignored by spi 1 1 1 master with modf input-only to spi f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 241 non-disclosure agreement required configures the spsck, mosi, and miso pins as open-drain outputs enables the spi module sprie ?spi receiver interrupt enable bit this read/write bit enables interrupt requests generated by the sprf bit. the sprf bit is set when a byte transfers from the shift register to the receive data register. 1 = sprf cpu interrupt requests or sprf dma service requests enabled 0 = sprf cpu interrupt requests or sprf dma service requests disabled dmas ?ma select bit this read/write bit has no effect on this version of the spi. this bit always read as 0. 0 = spre dma and spte dma service requests disabled spmstr ?spi master bit this read/write bit selects master mode operation or slave mode operation. 1 = master mode 0 = slave mode address: $000d bit 7 654321 bit 0 read: sprie dmas spmstr cpol cpha spwom spe sptie write: reset: 00101000 figure 13-13. spi control register (spcr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 242 serial peripheral interface module (spi) motorola cpol ?clock polarity bit this read/write bit determines the logic state of the spsck pin between transmissions. (see figure 13-4 and figure 13-6 .) to transmit data between spi modules, the spi modules must have identical cpol values. cpha ?clock phase bit this read/write bit controls the timing relationship between the serial clock and spi data. (see figure 13-4 and figure 13-6 .) to transmit data between spi modules, the spi modules must have identical cpha values. when cpha = 0, the ss pin of the slave spi module must be set to logic 1 between bytes. (see figure 13-12 .) spwom ?spi wired-or mode bit this read/write bit disables the pullup devices on pins spsck, mosi, and miso pins so that those pins become open-drain outputs. 1 = wired-or spsck, mosi, and miso pins 0 = normal push-pull spsck, mosi, and miso pins spe ?spi enable bit this read/write bit enables the spi module. clearing spe causes a partial reset of the spi. (see 13.10 resetting the spi .) 1 = spi module enabled 0 = spi module disabled sptie?spi transmit interrupt enable bit this read/write bit enables interrupt requests generated by the spte bit. spte is set when a byte transfers from the transmit data register to the shift register. 1 = spte interrupt requests enabled 0 = spte interrupt requests disabled f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 243 non-disclosure agreement required 13.14.2 spi status and control register the spi status and control register contains flags to signal these conditions: receive data register full failure to clear sprf bit before next byte is received (overflow error) inconsistent logic level on ss pin (mode fault error) transmit data register empty the spi status and control register also contains bits that perform these functions: enable error interrupts enable mode fault error detection select master spi baud rate sprf ?spi receiver full bit this clearable, read-only flag is set each time a byte transfers from the shift register to the receive data register. sprf generates an interrupt request if the sprie bit in the spi control register is set also. 1 = receive data register full 0 = receive data register not full address: $000e bit 7 654321 bit 0 read: sprf errie ovrf modf spte modfen spr1 spr0 write: reset: 00001000 = unimplemented figure 13-14. spi status and control register (spscr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 244 serial peripheral interface module (spi) motorola errie ?error interrupt enable bit this read/write bit enables the modf and ovrf bits to generate cpu interrupt requests. reset clears the errie bit. 1 = modf and ovrf can generate cpu interrupt requests. 0 = modf and ovrf cannot generate cpu interrupt requests. ovrf ?overflow bit this clearable, read-only flag is set if software does not read the byte in the receive data register before the next full byte enters the shift register. in an overflow condition, the byte already in the receive data register is unaffected, and the byte that shifted in last is lost. clear the ovrf bit by reading the spi status and control register with ovrf set and then reading the receive data register. 1 = overflow 0 = no overflow modf ?mode fault bit this clearable, read-only flag is set in a slave spi if the ss pin goes high during a transmission with the modfen bit set. in a master spi, the modf flag is set if the ss pin goes low at any time with the modfen bit set. clear the modf bit by reading the spi status and control register (spscr) with modf set and then writing to the spi control register (spcr). 1 = ss pin at inappropriate logic level 0 = ss pin at appropriate logic level spte ?spi transmitter empty bit this clearable, read-only flag is set each time the transmit data register transfers a byte into the shift register. spte generates an interrupt request if the sptie bit in the spi control register is set also. 1 = transmit data register empty 0 = transmit data register not empty note: do not write to the spi data register unless the spte bit is high. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial peripheral interface module (spi) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola serial peripheral interface module (spi) 245 non-disclosure agreement required modfen ?mode fault enable bit this read/write bit, when set to 1, allows the modf flag to be set. if the modf flag is set, clearing the modfen does not clear the modf flag. if the modfen bit is low, the level of the ss pin does not affect the operation of an enabled spi configured as a master. for an enabled spi configured as a slave, having modfen low only prevents the modf flag from being set. it does not affect any other part of spi operation. (see 13.8.2 mode fault error .) spr1 and spr0 ?spi baud rate select bits in master mode, these read/write bits select one of four baud rates as shown in table 13-3 . spr1 and spr0 have no effect in slave mode. reset clears spr1 and spr0. use this formula to calculate the spi baud rate: cgmout = base clock output of the clock generator module (cgm) bd = baud rate divisor table 13-3. spi master baud rate selection spr1 and spr0 baud rate divisor (bd) 00 2 01 8 10 32 11 128 baud rate cgmout 2bd -------------------------- = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required serial peripheral interface module (spi) advance information mc68hc(9)08lk60 rev. 1.0 246 serial peripheral interface module (spi) motorola 13.14.3 spi data register the spi data register consists of the read-only receive data register and the write-only transmit data register. writing to the spi data register writes data into the transmit data register. reading the spi data register reads data from the receive data register. the transmit data and receive data registers are separate registers that can contain different values. (see figure 13-2 .) r7?0/t7?0 ?receive/transmit data bits note: do not use read-modify-write instructions on the spi data register since the register read is not the same as the register written. address: $000f bit 7 654321 bit 0 read: r7 r6 r5 r4 r3 r2 r1 r0 write: t7 t6 t5 t4 t3 t2 t1 t0 reset: indeterminate after reset figure 13-15. spi data register (spdr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola alert output generator (alr) 247 non-disclosure agreement required advance information mc68hc(9)08lk60 section 14. alert output generator (alr) 14.1 contents 14.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247 14.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247 14.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247 14.4.1 alert control register . . . . . . . . . . . . . . . . . . . . . . . . . . . .249 14.4.2 sound pressure level circuit . . . . . . . . . . . . . . . . . . . . . .249 14.4.3 alert data register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250 14.2 introduction this section describes the alert output generaor (alr), which provides 14 software selectable square wave output frequencies. 14.3 features features of the alr module include: 14 software selectable audio alert tone outputs 4-bit software selectable sound pressure level control 14.4 functional description this system will be used to generate alert tones as the output signal alert. the audio alert tone generator is controlled by the four control bits as shown in table 14-1 . this allows 14 possible frequencies to drive the alert output. the zero state acts as an off mode and places the output in a high-impedance mode and an on mode places the output in ground state. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required alert output generator (alr) advance information mc68hc(9)08lk60 rev. 1.0 248 alert output generator (alr) motorola note: the alert module is enabled only when the on-chip phase locked loop (pll) is engaged. during wait mode, the alcr register should be programmed with value $00 to ensure a three-state output and eliminate any residual output from the audio frequency generator. table 14-1. audio alert tone generator divider ratios al3?l0 audio alert generator frequencies at given f osc f osc 32.768 khz 32.000 khz 38.4 khz 0000 off hi-z hi-z hi-z 0001 f osc 32 1024 10001 1200 0010 f osc 8 4096 4000 4800 0011 f osc 16 2048 2000 2400 0100 f osc 6 5461 5333 6400 0101 f osc 12 2730 2666 3200 0110 f osc 24 1365 1333 1600 0111 f osc 48 683 667 800 1000 f osc 10 3276 3200 3840 1001 f osc 20 1638 1600 1920 1010 f osc 40 819 800 960 1011 f osc 80 410 400 480 1100 f osc 14 2341 2285 2743 1101 f osc 28 1170 1143 1371 1110 f osc 56 585 571 686 1111 off v ss v ss v ss f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
alert output generator (alr) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola alert output generator (alr) 249 non-disclosure agreement required 14.4.1 alert control register the alert control register (alcr) bits are in figure 14-1 . al3?l0 ?alert frequency select bits the value of these bits determines the frequency of the alert output (see table 14-1 ). if these bits are set to all 0s, the alert output will be high impedance (off). if set to all 1s, the alert output will be at v ss (logic 0). reset clears these bits, turning this output off to the high-impedance state. 14.4.2 sound pressure level circuit the sound pressure level (spl) control register is used to control the volume of the alert transducer. a high-frequency clock signal is used to modulate the normal alert output frequency. this modulation reduces the amplitude of the frequency components in the audible range while adding new frequencies outside the audible range. this feature causes a significant reduction in the spl of the transducer. a broad range of volume control is obtained by altering the duty cycle of the high frequency modulation signal. the spl control register is software programmable to allow users to select different frequencies with different duty cycles. address: $0011 bit 7 654321 bit 0 read: 0000 al3 al2 al1 al0 write: reset: 00000000 = unimplemented figure 14-1. alert control register (alcr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required alert output generator (alr) advance information mc68hc(9)08lk60 rev. 1.0 250 alert output generator (alr) motorola 14.4.3 alert data register the alert data register (aldr) bits are: spl7 bit this bit selects between 16-phase duty cycle modulation if bit spl7 = 0 and 8-phase duty cycle modulation if bit spl7 = 1. spl6 bit this bit selects between the output (dcmod) of the duty cycle modulator when spl6 = 0 and the clock fmodhi when spl6 = 1 to send to the output splclk to modulate the alert output. (see figure 14-3 .) spl5 and spl4 bits these bits are used to control the frequency divider selections (divided by 1, 2, and 4) and, along with bit spl6 in one case where both spl4 and spl5 are high, to select between a cpu clock divided by 8 and the crystal clock. (see table 14-2 .) address: $0012 bit 7 654321 bit 0 read: spl7 spl6 spl5 spl4 spl3 spl2 spl1 spl0 write: reset: 00000000 figure 14-2. alert data register (aldr) table 14-2. clock divider and modulator selections spl6 spl5 spl4 fmodhi splclk 0 0 0 it12/1 dcmod 0 0 01 it12/2 dcmod 0 1 0 it12/4 dcmod 0 1 1 it12/8 dcmod 1 0 0 it12/1 fmodhi f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
alert output generator (alr) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola alert output generator (alr) 251 non-disclosure agreement required spl3?pl0 bits these bits control the duty cycle of the modulation signal, as shown in table 14-3 . 1 0 1 it12/2 fmodhi 1 1 0 it12/4 fmodhi 1 1 1 cgmxclk fmodhi table 14-3. duty cycle selection spl3 spl2 spl1 spl0 duty cycle 8-phase count (spl7 = 1) duty cycle 16-phase count (spl7 = 0) 0 0 0 0 spl disabled spl disabled 0 0 0 1 1/8 high 7/8 low 1/16 high 15/16 low 0 0 1 0 2/8 high 6/8 low 2/16 high 14/16 low 0 0 1 1 3/8 high 5/8 low 3/16 high 13/16 low 0 1 0 0 4/8 high 4/8 low 4/16 high 12/16 low 0 1 0 1 5/8 high 3/8 low 5/16 high 11/16 low 0 1 1 0 6/8 high 2/8 low 6/16 high 10/16 low 0 1 1 1 7/8 high 1/8 low 7/16 high 9/16 low 1 0 0 0 spl disabled 8/16 high 8/16 low 1 0 0 1 1/8 high 7/8 low 9/16 high 7/16 low 1 0 1 0 2/8 high 6/8 low 10/16 high 6/16 low 1 0 1 1 3/8 high 5/8 low 11/16 high 5/16 low 1 1 0 0 4/8 high 4/8 low 12/16 high 4/16 low 1 1 0 1 5/8 high 3/8 low 13/16 high 3/16 low 1 1 1 0 6/8 high 2/8 low 14/16 high 2/16 low 1 1 1 1 7/8 high 1/8 low 15/16 high 1/16 low table 14-2. clock divider and modulator selections (continued) spl6 spl5 spl4 fmodhi splclk f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required alert output generator (alr) advance information mc68hc(9)08lk60 rev. 1.0 252 alert output generator (alr) motorola figure 14-3. block diagram of spl reduction circuit divider 1 2 4 8 m u x m u x cpu xtal clock fmodhi dcmod splclk duty cycle modulator audio signal frequency selection v cc v o spl6 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola liquid crystal display module (lcd) 253 non-disclosure agreement required advance information mc68hc(9)08lk60 section 15. liquid crystal display module (lcd) 15.1 contents 15.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253 15.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253 15.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254 15.5 lcd registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255 15.5.1 lcd control register . . . . . . . . . . . . . . . . . . . . . . . . . . . .255 15.5.2 lcd address register. . . . . . . . . . . . . . . . . . . . . . . . . . . .256 15.5.3 lcd data register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258 15.6 anti-ghosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .262 15.7 software examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263 15.8 power supply pins (v ll , v ll12 , v ll32 , and vcp1?cp4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .264 15.2 introduction the liquid crystal display (lcd) module provides software control for eight backplanes and either 10 or 85 frontplanes. 15.3 features features of the lcd module include: built-in voltage generator charge pump software selectable three, five, or eight backplanes software selectable 10 or 85 frontplanes anti-ghosting capability f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required liquid crystal display module (lcd) advance information mc68hc(9)08lk60 rev. 1.0 254 liquid crystal display module (lcd) motorola 15.4 functional description this lcd driver circuit has a maximum of eight backplanes (bp) and 85 frontplanes (fp). the output waveform has a maximum output level of 3/2 v ll and is configured with 1/3 bias. the output voltage levels are v ss , 1/2 v ll , v ll , and 3/2 v ll (v ll ?lcd power supply). the bias voltage levels are generated internally from the external inputs v ll , v cp1 ? cp4 , v ll12 , and v ll32 . for more information on using the lcd voltage converter, see the functional pin description in 15.8 power supply pins (vll, vll12, vll32, and vcp1?cp4) . figure 15-1. lcd driver block diagram m68hc08 davinci internal bus lcd address register lcd data register pointer logic 85 lcd fp 8-bit latches lcd drivers backplane generator voltage generator bp0 bp1 bp6 bp7 fp0 fp1 fp83 fp84 ... ... 4 8 8 data 8 data vcp1 vcp2 vll32 vll clock from timebase circuit vcp3 vcp4 vll12 5 add 5 add f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
liquid crystal display module (lcd) lcd registers mc68hc(9)08lk60 rev. 1.0 advance information motorola liquid crystal display module (lcd) 255 non-disclosure agreement required 15.5 lcd registers the lcd driver outputs are manipulated through software control of the lcd control register, the lcd address register, and the lcd data register. data is written to each of the 85 frontplanes by writing the fp number to the lcd address register and then writing the data to the lcd data register. 15.5.1 lcd control register the lcd control register (lcdcr) is a read/write register containing the control bits to configure the lcd drivers. duty1 and duty0 ?duty cycle select bits these bits enable all fp outputs and select the duty of the lcd driver, enabling the specified number of bp outputs. reset clears these bits, disabling lcd waveforms at the outputs. when disabled, an lcd output will be held at v ss . table 15-1 shows the duty cycle selected and the corresponding number of backplanes, as well as the frame rate for the chosen duty cycle. address: $001a bit 7 654321 bit 0 read: duty1 duty0 agon dsmin motmd 0 0 0 write: reset: 00000000 figure 15-2. lcd control register (lcdcr) table 15-1. duty cycle select duty1 duty0 duty number of backplanes frame rate f osc = 32.000 khz frame rate f osc = 38.4 khz 00 off off off off 01 1/3 3 27.8 hz 33.3 hz 10 1/5 5 25.0 hz 30.0 hz 11 1/8 8 31.25 hz 37.5 hz f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required liquid crystal display module (lcd) advance information mc68hc(9)08lk60 rev. 1.0 256 liquid crystal display module (lcd) motorola agon ?anti-ghost on bit this bit is used to turn the anti-ghosting feature on or off. when agon = 1, the anti-ghosting feature is enabled. when agon = 0, anti-ghosting is turned off. for additional information, see 15.6 anti-ghosting . this bit is cleared by reset. dsmin ?display minimum bit this bit is used to force the data of the lower 75 fp (fp0?p74) to be 0. this mode is used to enable only part of the display to be on (for example, clock display) without having to rewrite the data on the rest of the display to 0. motmd ?motorola (multiplex) mode bit this bit can be used to convert the lcd outputs to accommodate multiplexed lcd driver ics (integrated circuits) from motorola (mc145000 and mc145001). 1 = motorola (multiplex) mode enabled 0 = standard (lower current consumption) mode enabled 15.5.2 lcd address register the lcd address register (lcdar) is a read/write register used to access the data for each fp register. to access the fp registers, the lcd address is the frontplane pin number converted to hexadecimal. for this implementation of 85 frontplanes, bit 7 is always set to 0. (see table 15-2 .) address: $001b bit 7 654321 bit 0 read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 00000000 figure 15-3. lcd address register (lcdar) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
liquid crystal display module (lcd) lcd registers mc68hc(9)08lk60 rev. 1.0 advance information motorola liquid crystal display module (lcd) 257 non-disclosure agreement required table 15-2. frontplane address assignments pin name address pin name address fp0 fp1 fp2 fp3 fp4 $01 $02 $03 $04 $05 fp45 fp46 fp47 fp48 fp49 $2e $2f $30 $31 $32 fp5 fp6 fp7 fp8 fp9 $06 $07 $08 $09 $0a fp50 fp51 fp52 fp53 fp54 $33 $34 $35 $36 $37 fp10 fp11 fp12 fp13 fp14 $0b $0c $0d $0e $0f fp55 fp56 fp57 fp58 fp59 $38 $39 $3a $3b $3c fp15 fp16 fp17 fp18 fp19 $10 $11 $12 $13 $14 fp60 fp61 fp62 fp63 fp64 $3d $3e $3f $40 $41 fp20 fp22 fp23 fp24 fp25 $15 $16 $17 $18 $19 fp65 fp66 fp67 fp68 fp69 $42 $43 $44 $45 $46 fp25 fp26 fp27 fp28 fp29 $1a $1b $1c $1d $1e fp70 fp71 fp72 fp73 fp74 $47 $48 $49 $4a $4b fp30 fp31 fp32 fp33 fp34 $1f $20 $21 $22 $23 fp75 fp76 fp77 fp78 fp79 $4c $4d $4e $4f $50 fp35 fp36 fp37 fp38 fp39 $24 $25 $26 $27 $28 fp80 fp81 fp82 fp83 fp84 $51 $52 $53 $54 $55 fp40 fp41 fp42 fp43 fp44 $29 $2a $2b $2c $2d f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required liquid crystal display module (lcd) advance information mc68hc(9)08lk60 rev. 1.0 258 liquid crystal display module (lcd) motorola 15.5.3 lcd data register each bit in the read/write lcd data register (lcddr) is the data to be written out on to the fp pin, as specified in the lcd address register, in the appropriate bp time frame. the correct address must be written into the lcd address register before reading from or writing to the lcd data register. the data in this register is for all the segments controlled by the fp driver. if the user has selected less than eight backplanes, the upper bits of this register will be unknown. bpx 1 = fp output on during bpx time frame 0 = fp output off during bpx time frame for example, if the segment controlled by fp1 and bp4 is to be on, follow this sequence: 1. write $02 to the lcd address register. 2. write 1 to bit 4 of the lcd data register. address: $001c bit 7 654321 bit 0 read: bp7 bp6 bp5 bp4 bp3 bp2 bp1 bp0 write: reset: 00000000 figure 15-4. lcd data register (lcddr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
liquid crystal display module (lcd) lcd registers mc68hc(9)08lk60 rev. 1.0 advance information motorola liquid crystal display module (lcd) 259 non-disclosure agreement required figure 15-5. lcd backplane waveforms ?3 bp bp0 bp1 bp2 fpx on during bp1 fpx waveform 1/3 duty all bp on/off negative ground +3.0 +2.0 +1.0 0 positive ground +1.0 0 ?.0 ?.0 v ll32 v ll v ll12 v ss v ll32 v ll v ll12 v ss on off 1 frame v ll32 v ll v ll12 v ss ? ll12 ? ll ? ll32 fpx data register = $x001 fpx data register = $x111 (on) fpx data register = $x000 (off) segment waveform bp1 ?fpx fpx data register = $xxx1 (on) fpx data register = $xxx0 (off) 27.8 hz f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required liquid crystal display module (lcd) advance information mc68hc(9)08lk60 rev. 1.0 260 liquid crystal display module (lcd) motorola figure 15-6. lcd backplane waveforms ?5 bp bp0 bp1 bp2 bp3 bp4 fpx on during bp0 fpx waveform 1/5 duty all bp on/off negative ground +3.0 +2.0 +1.0 0 positive ground +1.0 0 ?.0 ?.0 v ll32 v ll v ll12 v ss v ll32 v ll v ll12 v ss 1 frame on off v ll32 v ll v ll12 v ss ? ll12 ? ll ? ll32 fpx data register = $xxx0 0001 fpx data register = $xxx1 1111 (on) fpx data register = $xxx0 0000 (off) fpx data register = $xxxx xxx1 (on) fpx data register = $xxxx xxx0 (off) 25.0 hz segment waveform bp0 ?fpx f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
liquid crystal display module (lcd) lcd registers mc68hc(9)08lk60 rev. 1.0 advance information motorola liquid crystal display module (lcd) 261 non-disclosure agreement required figure 15-7. lcd backplane waveforms ?8 bp bp0 bp1 bp2 bp3 bp4 fpx on during bp0 fpx waveform 1/8 duty all bp on/off bp5 bp7 bp6 v ll32 v ll v ll12 v ss on 1 frame off fpx data register = $0000 0001 fpx data register = $1111 1111 (on) fpx data register = $0000 0000 (off) fpx data register = $xxxx xxx1 (on) fpx data register = $xxxx xxx0 (off) segment waveform bp0 ?fpx 31.25 hz negative ground +3.0 +2.0 +1.0 0 positive ground +1.0 0 ?.0 ?.0 v ll32 v ll v ll12 v ss v ll32 v ll v ll12 v ss ? ll12 ? ll ? ll32 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required liquid crystal display module (lcd) advance information mc68hc(9)08lk60 rev. 1.0 262 liquid crystal display module (lcd) motorola 15.6 anti-ghosting the purpose of the anti-ghosting feature is to provide the user with the option to improve the lcd viewing angle at the expense of display contrast and increased power consumption. the level of improvement to the viewing angle as well as the amount of reduction in contrast depends entirely on the display used. the anti-ghosting is performed by taking all frontplane and backplane pins to v ss potential for a short time (~16 s), while the internal muxing circuitry is transitioning. see figure 15-8 for waveforms detailing the anti-ghosting pulses. note: the anti-ghosting pulses are not shown in the previous figures. operating i dd current approximately doubles with the use of the anti- ghosting function. this feature generates radiated noise that has been shown to negatively impact rf (radio frequency) performance in some applications. rf testing should be completed before implementing anti-ghosting. figure 15-8. lcd backplane waveforms with anti-ghosting ?3 bp bp0 bp1 bp2 fpx on during bp0 fpx waveform 1/3 duty all bp on/off negative ground +3.0 +2.0 +1.0 0 positive ground +1.0 0 ?.0 ?.0 v ll32 v ll v ll12 v ss v ll32 v ll v ll12 v ss on off 1 frame v ll32 v ll v ll12 v ss ? ll12 ? ll ? ll32 fpx data register = $x001 fpx data register = $x111 (on) fpx data register = $x000 (off) segment waveform bp0 ?fpx fpx data register = $xxx1 (on) fpx data register = $xxx0 (off) 27.8 hz ~16 s ~5.9 ms anti-ghosting pulse v ll32 v ll v ll12 v ss f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
liquid crystal display module (lcd) software examples mc68hc(9)08lk60 rev. 1.0 advance information motorola liquid crystal display module (lcd) 263 non-disclosure agreement required 15.7 software examples this example shows a routine which loads the lcd data register with information for each frontplane. ************************************************************************ * * lcd register definitions * lcdcr equ $1a lcd control register lcdar equ $1b lcd address register lcddr equ $1c lcd data register org $8000 * * load data into correct data registers * ldx #45 load correct number of data registers datald stx lcdar point to the desired data register lda data-1,x fetch data sta lcddr store data decx point to next register bne datald continue until all data registers full * * turn on display * ldx #$c0 stx lcdcr configure w/ 8 bps bra * loop here; hold display * *message table - displays " display " in nine 5x7 dot matrix characters *(0 = off, 1 = on) * bp0 f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f . . . * bp0 p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p . . . * bp0 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 . . . * bp0 0 0 0 0 0 01 1 1 0 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 . . . * * bp0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 0 1 0 0 0 0 . . . * bp1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 . . . * bp2 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 . . . * bp3 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 1 0 1 1 1 1 0 1 0 0 0 0 . . . * bp4 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 . . . * bp5 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 . . . * bp6 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 1 1 1 1 0 1 0 0 0 0 1 1 1 1 1 . . . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required liquid crystal display module (lcd) advance information mc68hc(9)08lk60 rev. 1.0 264 liquid crystal display module (lcd) motorola data equ * ** ** fcb $00,$00,$00,$00,$00 **d** fcb $7f,$41,$41,$22,$1c **i** fcb $00,$41,$7f,$41,$00 **s** fcb $46,$49,$49,$49,$31 **p** fcb $7f,$09,$09,$09,$06 **l** fcb $7f,$40,$40,$40,$40 **a** fcb $7e,$11,$11,$11,$7e **y** fcb $07,$08,$70,$08,$07 ** ** fcb $00,$00,$00,$00,$00 15.8 power supply pins (v ll , v ll12 , v ll32 , and v cp1 ? cp4 ) these are power supply pins for the lcd voltage converter. when using the internal lcd voltage converter, the pins should be connected as shown in figure 15-9 . figure 15-9. lcd voltage converter connections if an external voltage supply is used to power the lcd module, the appropriate voltages should be applied to the v ll , v ll12 ( 1 / 2 v ll ) and v ll32 ( 3 / 2 v ll ) pins. v cp1 ? cp4 should be left floating. v ll v ll12 v ll32 vcp1 vcp2 vcp3 v ll 0.1 f, used for supply bypass vcp4 0.1 f 0.1 f 0.1 f 0.1 f f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 265 non-disclosure agreement required advance information mc68hc(9)08lk60 section 16. timer interface module (tim) 16.1 contents 16.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266 16.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266 16.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 16.4.1 timer counter prescaler . . . . . . . . . . . . . . . . . . . . . . . . . .270 16.4.2 input capture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 16.4.3 output compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271 16.4.3.1 unbuffered output compare . . . . . . . . . . . . . . . . . . . . .271 16.4.3.2 buffered output compare . . . . . . . . . . . . . . . . . . . . . . .272 16.4.4 pulse width modulation (pwm) . . . . . . . . . . . . . . . . . . . .273 16.4.4.1 unbuffered pwm signal generation . . . . . . . . . . . . . . .274 16.4.4.2 buffered pwm signal generation . . . . . . . . . . . . . . . . .275 16.4.4.3 pwm initialization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .276 16.5 interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277 16.6 low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278 16.6.1 wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278 16.6.2 stop mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278 16.7 tim during break interrupts . . . . . . . . . . . . . . . . . . . . . . . . . .278 16.8 i/o signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279 16.8.1 tim clock pin (tclk) . . . . . . . . . . . . . . . . . . . . . . . . . . . .279 16.8.2 timer channel i/o pins (tch0?ch3). . . . . . . . . . . . . . .279 16.9 i/o registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280 16.9.1 timer status and control register . . . . . . . . . . . . . . . . . .280 16.9.2 timer counter registers . . . . . . . . . . . . . . . . . . . . . . . . .283 16.9.3 timer modulo registers . . . . . . . . . . . . . . . . . . . . . . . . . .284 16.9.4 timer channel status and control registers . . . . . . . . . .285 16.9.5 timer channel registers. . . . . . . . . . . . . . . . . . . . . . . . . .290 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 266 timer interface module (tim) motorola 16.2 introduction this section describes the timer interface module (tim). the tim is a 4-channel timer that provides a timing reference with input capture, output compare, and pulse-width-modulation functions. figure 16-1 is a block diagram of the tim. note: references to dma and associated functions are only valid if the mcu has a dma module. this mcu does not have the dma function. any dma-related register bits should be left in their reset state for normal mcu operation. 16.3 features features of the tim include: modular architecture four input capture/output compare channels: rising-edge, falling-edge, or any-edge input capture trigger set, clear, or toggle output compare action buffered and unbuffered pulse width modulation (pwm) signal generation programmable tim clock input: seven-frequency internal bus clock prescaler selection external tim clock input (4-mhz maximum frequency) free-running or modulo up-count operation toggle any channel pin on overflow timer counter stop and reset bit note: because no input or output pins are available for the timer module, the input capture functions are disabled. however, for the output compare function, when the counter reaches the value in the selected channel register, the timer can generate an interrupt to cpu. but it can? set, clear, or toggle the timer compare pin. ignore all references to tchx pins. see 16.5 interrupts for more information. note: the shaded boxes in figure 16-1 are not implemented in this module. all references to these blocks should be ignored. tclk is a floating pin. do not set the ps2?s0 bits in the tim status and control register to select tclk input. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) features mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 267 non-disclosure agreement required figure 16-1. tim block diagram prescaler prescaler select internal 16-bit comparator ps2 ps1 ps0 16-bit comparator 16-bit latch tch0h:tch0l ms0a els0b els0a tof toie inter- 16-bit comparator 16-bit latch tch1h:tch1l 16-bit comparator 16-bit latch tch2h:tch2l 16-bit comparator 16-bit latch tch3h:tch3l channel 0 channel 1 channel 2 channel 3 tmodh:tmodl trst tstop tov0 ch0ie dma0s ch0f els1b els1a tov1 ch1ie dma1s ch1max ch1f els2b els2a tov2 ch2ie dma2s ch2max ch2f els3b els3a tov3 ch3ie dma3s ch3max ch3f ch0max ms0b ms2b 16-bit counter internal bus bus clock ms1a ms2a ms3a tclk tch0 tch1 tch2 tch3 logic rupt logic inter- rupt logic logic inter- rupt logic logic inter- rupt logic logic inter- rupt logic f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 268 timer interface module (tim) motorola addr. register name bit 7 6 5 4 3 2 1 bit 0 $0020 tim status and control register (tsc) read: tof toie tstop 00 ps2 ps1 ps0 write: 0 trst reset: 0 0 0 0 0 0 0 0 $0021 unimplemented $0022 tim counter register high (tcnth) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $0023 tim counter register low (tcntl) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 $0024 tim counter modulo register high (tmodh) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $0025 tim counter modulo register low (tmodl) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 $0026 tim channel 0 status and control register (tsc0) read: ch0f ch0ie ms0b ms0a els0b els0a tov0 ch0max write: 0 reset: 0 0 0 0 0 0 0 0 $0027 tim channel 0 register high (tch0h) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $0028 tim channel 0 register low (tch0l) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 = unimplemented figure 16-2. tim i/o register summary f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) features mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 269 non-disclosure agreement required $0029 tim channel 1 status and control register (tsc1) read: ch1f ch1ie 0 ms1a els1b els1a tov1 ch1max write: 0 reset: 0 0 0 0 0 0 0 0 $002a tim channel 1 register high (tch1h) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $002b tim channel 1 register low (tch1l) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 $002c tim channel 2 status and control register (tsc2) read: ch2f ch2ie ms2b ms2a els2b els2a tov2 ch2max write: 0 reset: 0 0 0 0 0 0 0 0 $002d tim channel 2 register high (tch2h) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $002e tim channel 2 register low (tch2l) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 $002f tim channel 3 status and control register (tsc3) read: ch3f ch3ie 0 ms3a els3b els3a tov3 ch3max write: 0 reset: 0 0 0 0 0 0 0 0 $0030 tim channel 3 register high (tch3h) read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 0 0 0 0 0 0 0 0 $0031 tim channel 3 register low (tch3l) read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 0 0 0 0 0 0 0 0 addr. register name bit 7 6 5 4 3 2 1 bit 0 = unimplemented figure 16-2. tim i/o register summary (continued) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 270 timer interface module (tim) motorola 16.4 functional description figure 16-1 shows the structure of the tim. the central component of the tim is the 16-bit timer counter that can operate as a free-running counter or a modulo up-counter. the timer counter provides the timing reference for the input capture and output compare functions. the timer counter modulo registers, tmodh and tmodl, control the modulo value of the timer counter. software can read the timer counter value at any time without affecting the counting sequence. the four tim channels are programmable independently as input capture or output compare channels. 16.4.1 timer counter prescaler the tim clock source can be one of the seven prescaler outputs or the tim clock pin, tclk. the prescaler generates seven clock rates from the internal bus clock. the prescaler select bits, ps2?s0, in the timer status and control register select the tim clock source. note: this device does not have a tclk pin. 16.4.2 input capture with the input capture function, the tim can capture the time at which an external event occurs. when an active edge occurs on the pin of an input capture channel, the tim latches the contents of the timer counter into the timer channel registers, tchxh and tchxl. the polarity of the active edge is programmable. input capture latency can be up to three bus clock cycles. input captures can generate tim cpu interrupt requests. note: this device does not have input capture functionality. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 271 non-disclosure agreement required 16.4.3 output compare with the output compare function, the tim can generate a periodic pulse with a programmable polarity, duration, and frequency. when the counter reaches the value in the registers of an output compare channel, the tim can set, clear, or toggle the channel pin. output compares can generate tim cpu interrupt requests or tim dma service requests. note: this device does not have output compare pins. 16.4.3.1 unbuffered output compare any output compare channel can generate unbuffered output compare pulses as described in 16.4.3 output compare . the pulses are unbuffered because changing the output compare value requires writing the new value over the old value currently in the timer channel registers. an unsynchronized write to the timer channel registers to change an output compare value could cause incorrect operation for up to two counter overflow periods. for example, writing a new value before the counter reaches the old value but after the counter reaches the new value prevents any compare during that counter overflow period. also, using a timer overflow interrupt routine to write a new, smaller output compare value may cause the compare to be missed. the timer may pass the new value before it is written. use these methods to synchronize unbuffered changes in the output compare value on channel x: when changing to a smaller value, enable channel x output compare interrupts and write the new value in the output compare interrupt routine. the output compare interrupt occurs at the end of the current output compare pulse. the interrupt routine has until the end of the counter overflow period to write the new value. when changing to a larger output compare value, enable channel x timer overflow interrupts and write the new value in the timer overflow interrupt routine. the timer overflow interrupt occurs at the end of the current counter overflow period. writing a larger f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 272 timer interface module (tim) motorola value in an output compare interrupt routine (at the end of the current pulse) could cause two output compares to occur in the same counter overflow period. 16.4.3.2 buffered output compare channels 0 and 1 can be linked to form a buffered output compare channel whose output appears on the tch0 pin. the timer channel registers of the linked pair alternately control the output. setting the ms0b bit in timer channel 0 status and control register (tsc0) links channel 0 and channel 1. the output compare value in the timer channel 0 registers initially controls the output on the tch0 pin. writing to the timer channel 1 registers enables the timer channel 1 registers to synchronously control the output after the timer overflows. at each subsequent overflow, the timer channel registers (0 or 1) that control the output are the ones written to last. tsc0 controls and monitors the buffered output compare function, and timer channel 1 status and control register (tsc1) is unused. while the ms0b bit is set, the channel 1 pin, tch1, is available as a general-purpose i/o pin. channels 2 and 3 can be linked to form a buffered output compare channel whose output appears on the tch2 pin. the timer channel registers of the linked pair alternately control the output. setting the ms2b bit in timer channel 2 status and control register (tsc2) links channel 2 and channel 3. the output compare value in the timer channel 2 registers initially controls the output on the tch2 pin. writing to the timer channel 3 registers enables the timer channel 3 registers to synchronously control the output after the timer overflows. at each subsequent overflow, the timer channel registers (2 or 3) that control the output are the ones written to last. tsc2 controls and monitors the buffered output compare function, and timer channel 3 status and control register (tsc3) is unused. in buffered output compare operation, do not write new output compare values to the currently active channel registers. writing to the active channel registers is the same as generating unbuffered output compares. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 273 non-disclosure agreement required 16.4.4 pulse-width modulation (pwm) by using the toggle-on-overflow feature with an output compare channel, the tim can generate a pwm signal. the value in the timer counter modulo registers determines the period of the pwm signal. the channel pin toggles when the counter reaches the value in the timer counter modulo registers. the time between overflows is the period of the pwm signal. as figure 16-3 shows, the output compare value in the timer channel registers determines the pulse width of the pwm signal. the time between overflow and output compare is the pulse width. program the tim to clear the channel pin on output compare if the state of the pwm pulse is logic 1. program the tim to set the pin if the state of the pwm pulse is logic 0. figure 16-3. pwm period and pulse width the value in the timer counter modulo registers and the selected prescaler output determine the frequency of the pwm output. the frequency of an 8-bit pwm signal is variable in 256 increments. writing $00ff (255) to the timer counter modulo registers produces a pwm period of 256 times the internal bus clock period. ptex/tchx period pulse width overflow overflow overflow output compare output compare output compare f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 274 timer interface module (tim) motorola the value in the timer channel registers determines the pulse width of the pwm output. the pulse width of an 8-bit pwm signal is variable in 256 increments. writing $0080 (128) to the timer channel registers produces a duty cycle of 128/256 or 50%. note: this device does not have channel pins for pwm. 16.4.4.1 unbuffered pwm signal generation any output compare channel can generate unbuffered pwm pulses as described in 16.4.4 pulse-width modulation (pwm) . the pulses are unbuffered because changing the pulse width requires writing the new pulse width value over the old value currently in the timer channel registers. an unsynchronized write to the timer channel registers to change a pulse width value could cause incorrect operation for up to two pwm periods. for example, writing a new value before the counter reaches the old value but after the counter reaches the new value prevents any compare during that pwm period. also, using a timer overflow interrupt routine to write a new, smaller pulse width value may cause the compare to be missed. the timer may pass the new value before it is written. use these methods to synchronize unbuffered changes in the pwm pulse width on channel x: when changing to a shorter pulse width, enable channel x output compare interrupts and write the new value in the output compare interrupt routine. the output compare interrupt occurs at the end of the current pulse. the interrupt routine has until the end of the pwm period to write the new value. when changing to a longer pulse width, enable channel x timer overflow interrupts and write the new value in the timer overflow interrupt routine. the timer overflow interrupt occurs at the end of the current pwm period. writing a larger value in an output compare interrupt routine (at the end of the current pulse) could cause two output compares to occur in the same pwm period. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 275 non-disclosure agreement required note: in pwm signal generation, do not program the pwm channel to toggle on output compare. toggling on output compare prevents reliable 0% duty cycle generation and removes the ability of the channel to self- correct in the event of software error or noise. toggling on output compare also can cause incorrect pwm signal generation when changing the pwm pulse width to a new, much larger value. 16.4.4.2 buffered pwm signal generation channels 0 and 1 can be linked to form a buffered pwm channel whose output appears on the tch0 pin. the timer channel registers of the linked pair alternately control the pulse width of the output. setting the ms0b bit in timer channel 0 status and control register (tsc0) links channel 0 and channel 1. the timer channel 0 registers initially control the pulse width on the tch0 pin. writing to the timer channel 1 registers enables the timer channel 1 registers to synchronously control the pulse width at the beginning of the next pwm period. at each subsequent overflow, the timer channel registers (0 or 1) that control the pulse width are the ones written to last. tsc0 controls and monitors the buffered pwm function, and timer channel 1 status and control register (tsc1) is unused. while the ms0b bit is set, the channel 1 pin, tch1, is available as a general-purpose i/o pin if the timer pad is shared with the i/o pad. channels 2 and 3 can be linked to form a buffered pwm channel whose output appears on the tch2 pin. the timer channel registers of the linked pair alternately control the pulse width of the output. setting the ms2b bit in timer channel 2 status and control register (tsc2) links channel 2 and channel 3. the timer channel 2 registers initially control the pulse width on the tch2 pin. writing to the timer channel 3 registers enables the timer channel 3 registers to synchronously control the pulse width at the beginning of the next pwm period. at each subsequent overflow, the timer channel registers (2 or 3) that control the pulse width are the ones written to last. tsc2 controls and monitors the buffered pwm function, and timer channel 3 status and control register (tsc3) is unused. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 276 timer interface module (tim) motorola note: in buffered pwm signal generation, do not write new pulse width values to the currently active channel registers. writing to the active channel registers is the same as generating unbuffered pwm signals. 16.4.4.3 pwm initialization to ensure correct operation when generating unbuffered or buffered pwm signals, use this initialization procedure: 1. in the timer status and control register (tsc): a. stop the timer counter by setting the timer stop bit, tstop. b. reset the timer counter by setting the timer reset bit, trst. 2. in the timer counter modulo registers (tmodh and tmodl), write the value for the required pwm period. 3. in the timer channel x registers (tchxh and tchxl), write the value for the required pulse width. 4. in timer channel x status and control register (tscx): a. write 0:1 (for unbuffered output compare or pwm signals) or 1:0 (for buffered output compare or pwm signals) to the mode select bits, msxb:msxa. (see table 16-2 .) b. write 1 to the toggle on overflow bit, tovx. c. write 1:0 (to clear output on compare) or 1:1 (to set output on compare) to the edge/level select bits, elsxb and elsxa. the output action on compare must force the output to the complement of the pulse width level. (see table 16-2 .) note: in pwm signal generation, do not program the pwm channel to toggle on output compare. toggling on output compare prevents reliable 0% duty cycle generation and removes the ability of the channel to self- correct in the event of software error or noise. toggling on output compare can also cause incorrect pwm signal generation when changing the pwm pulse width to a new, much larger value. 5. in the timer status control register (tsc), clear the timer stop bit, tstop. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) interrupts mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 277 non-disclosure agreement required setting ms0b links channels 0 and 1 and configures them for buffered pwm operation. the timer channel 0 registers (tch0h and tch0l) initially control the buffered pwm output. timer status control register 0 (tscr0) controls and monitors the pwm signal from the linked channels. ms0b takes priority over ms0a. setting ms2b links channels 2 and 3 and configures them for buffered pwm operation. the timer channel 2 registers (tch2h and tch2l) initially control the pwm output. timer status control register 2 (tscr2) controls and monitors the pwm signal from the linked channels. ms2b takes priority over ms2a. clearing the toggle on overflow bit, tovx, inhibits output toggles on timer overflows. subsequent output compares try to force the output to a state it is already in and have no effect. the result is a 0% duty cycle output. setting the chxmax bit generates a 100% duty cycle output. (see 16.9.4 timer channel status and control registers .) 16.5 interrupts the tim sources can generate these interrupt requests: tim overflow flag (tof) tof is set when the tim counter value matches the value in the tim counter modulo registers. the tim overflow interrupt enable bit, toie, enables the tof flag to generate tim overflow cpu interrupt requests. tof and toie are in the tim status and control register tim channel flags (ch3f?h0f) ?chxf is set when an input capture or output compare occurs on channel x. the channel x interrupt enable bit, chxie, enables the chxf flag to generate tim channel x cpu interrupt requests. chxf and chxie are in the tim channel x status and control register. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 278 timer interface module (tim) motorola 16.6 low-power modes the wait and stop instructions put the mcu in low power- consumption standby modes. 16.6.1 wait mode the tim remains active after the execution of a wait instruction. any enabled cpu interrupt request from the tim can bring the mcu out of wait mode. if the tim is not required to bring the mcu out of wait mode, reduce power consumption by stopping the tim before executing the wait instruction. 16.6.2 stop mode the tim is inactive after the execution of a stop instruction. the stop instruction does not affect register conditions or the state of the timer counter. timer operation resumes when the mcu exits stop mode after an external interrupt. note: this device does not function in stop mode. 16.7 tim during break interrupts a break interrupt stops the timer counter. the system integration module (sim) controls whether status bits in other modules can be cleared during the break state. the bcfe bit in the sim break flag control register (sbfcr) enables software to clear status bits during the break state. (see 9.5.1 break status and control register .) to allow software to clear status bits during a break interrupt, write a logic 1 to the bcfe bit. if a status bit is cleared during the break state, it remains cleared when the mcu exits the break state. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) i/o signals mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 279 non-disclosure agreement required to protect status bits during the break state, write a logic 0 to the bcfe bit. with bcfe at logic 0 (its default state), software can read and write i/o registers during the break state without affecting status bits. some status bits have a 2-step read/write clearing procedure. if software does the first step on such a bit before the break, the bit cannot change during the break state as long as bcfe is at logic 0. after the break, doing the second step clears the status bit. 16.8 i/o signals tclk is an external clock input to the timer prescaler. the four timer channel i/o pins are tch0, tch1, tch2, and tch3. note: this device does not have external timer pins. 16.8.1 tim clock pin (tclk) tclk is an external clock input that can be the clock source for the timer counter instead of the prescaled internal bus clock. select the tclk input by writing logic 1s to the three prescaler select bits, ps2?s0. (see 16.9.1 timer status and control register .) the minimum tclk pulse width, tclk lmin or tclk hmin , is: the maximum tclk frequency is: bus frequency 2 16.8.2 timer channel i/o pins (tch0?ch3) each channel i/o pin is programmable independently as an input capture pin or an output compare pin. tch0 and tch2 can be configured as buffered output compare or buffered pwm pins. 1 bus frequency ------------------------------------- t su + f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 280 timer interface module (tim) motorola 16.9 i/o registers these i/o registers control and monitor operation of the tim: timer status and control register (tsc) timer dma select register (tdma) timer control registers (tcnth and tcntl) timer counter modulo registers (tmodh and tmodl) timer channel status and control registers (tsc0, tsc1, tsc2, and tsc3) timer channel registers (tch0h, tch0l, tch1h, tch1l, tch2h, tch2l, tch3h, and tch3l) 16.9.1 timer status and control register the timer status and control register (tsc): enables timer overflow interrupts flags timer overflows stops the timer counter resets the timer counter and prescaler prescales the timer counter clock address: $0020 bit 7 654321 bit 0 read: tof toie tstop 00 ps2 ps1 ps0 write: 0 trst reset: 00000000 = unimplemented figure 16-4. timer status and control register (tsc) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 281 non-disclosure agreement required tof ?timer overflow flag bit this read/write flag is set when the timer counter reaches the modulo value programmed in the timer counter modulo registers. clear tof by reading the timer status and control register when tof is set and then writing a logic 0 to tof. if another timer overflow occurs before the clearing sequence is complete, then writing logic 0 to tof has no effect. therefore, a tof interrupt request cannot be lost due to inadvertent clearing of tof. reset clears the tof bit. writing a logic 1 to tof has no effect. 1 = timer counter has reached modulo value. 0 = timer counter has not reached modulo value. toie ?timer overflow interrupt enable bit this read/write bit enables timer overflow interrupts when the tof bit becomes set. reset clears the toie bit. 1 = timer overflow interrupts enabled 0 = timer overflow interrupts disabled tstop ?timer stop bit this read/write bit stops the timer counter. counting resumes when tstop is cleared. reset sets the tstop bit, stopping the timer counter until software clears the tstop bit. 1 = timer counter stopped 0 = timer counter active note: do not set the tstop bit before entering wait mode if the tim is required to exit wait mode. trst ?timer reset bit setting this write-only bit resets the timer counter and the timer prescaler. setting trst has no effect on any other registers. counting resumes from $0000. trst is cleared automatically after the timer counter is reset and always reads as logic 0. reset clears the trst bit. 1 = prescaler and timer counter cleared 0 = no effect note: setting the tstop and trst bits simultaneously stops the timer counter at a value of $0000. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 282 timer interface module (tim) motorola ps[2:0] ?prescaler select bits these read/write bits select either the pte3/tclk pin or one of the seven prescaler outputs as the input to the timer counter as table 16-1 shows. reset clears the ps2?s0 bits. note: tclk is a floating input pin. do not select ps2?s0 = 111. table 16-1. prescaler selection ps2?s0 tim clock source 000 internal bus clock 001 internal bus clock 2 010 internal bus clock 4 011 internal bus clock 8 100 internal bus clock 16 101 internal bus clock 32 110 internal bus clock 64 111 pte3/tclk f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 283 non-disclosure agreement required 16.9.2 timer counter registers the two read-only timer counter registers contain the high and low bytes of the value in the timer counter. reading the high byte (tcnth) latches the contents of the low byte (tcntl). subsequent reads of tcnth do not affect the latched tcntl value until tcntl is read. reset clears the timer counter registers. setting the timer reset bit (trst) also clears the timer counter registers. address: $0022 bit 7 654321 bit 0 read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 00000000 = unimplemented figure 16-5. timer counter register high (tcnth) address: $0023 bit 7 654321 bit 0 read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 00000000 = unimplemented figure 16-6. timer counter register low (tcntl) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 284 timer interface module (tim) motorola 16.9.3 timer modulo registers the read/write timer modulo registers contain the modulo value for the timer counter. when the timer counter reaches the modulo value, the overflow flag (tof) becomes set, and the timer counter resumes counting from $0000 at the next clock. the tof bit and overflow interrupts are inhibited after a write to the high byte (tmodh) until the low byte (tmodl) is written. reset sets the timer modulo registers. note: reset the timer counter before writing to the timer modulo registers. address: $0024 bit 7 654321 bit 0 read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 00000000 figure 16-7. timer modulo register high (tmodh) address: $0025 bit 7 654321 bit 0 read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 00000000 figure 16-8. timer modulo register low (tmodl) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 285 non-disclosure agreement required 16.9.4 timer channel status and control registers each of the timer channel status and control registers: flags input captures and output compares enables input capture and output compare interrupts selects input capture, output compare, or pwm operation selects high, low, or toggling output on output compare selects rising edge, falling edge, or any edge as the active input capture trigger selects output toggling on timer overflow selects 100% pwm duty cycle address: $0026 bit 7 654321 bit 0 read: ch0f ch0ie ms0b ms0a els0b els0a tov0 ch0max write: 0 reset: 00000000 figure 16-9. timer channel 0 status and control register (tsc0) address: $0029 bit 7 654321 bit 0 read: ch1f ch1ie 0 ms1a els1b els1a tov1 ch1max write: 0 reset: 00000000 = unimplemented figure 16-10. timer channel 1 status and control register (tsc1) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 286 timer interface module (tim) motorola chxf?channel x flag bit when channel x is an input capture channel, this read/write bit is set when an active edge occurs on the channel x pin. when channel x is an output compare channel, chxf is set when the value in the timer counter registers matches the value in the timer channel x registers. when tim cpu interrupt requests are enabled (chxie:dmaxs = 1:0), clear chxf by reading timer channel x status and control register with chxf set and then writing a logic 0 to chxf. if another interrupt request occurs before the clearing sequence is complete, then writing logic 0 to chxf has no effect. therefore, an interrupt request cannot be lost due to inadvertent clearing of chxf. when tim dma service requests are enabled (chxie:dmaxs = 1:1), clear chxf by reading or writing to the low byte of the timer channel x registers (tchxl). reset clears the chxf bit. writing a logic 1 to chxf has no effect. 1 = input capture or output compare on channel x 0 = no input capture or output compare on channel x address: $002c bit 7 654321 bit 0 read: ch2f ch2ie ms2b ms2a els2b els2a tov2 ch2max write: 0 reset: 00000000 figure 16-11. timer channel 2 status and control register (tsc2) address: $002f bit 7 654321 bit 0 read: ch3f ch3ie 0 ms3a els3b els3a tov3 ch3max write: 0 reset: 00000000 = unimplemented figure 16-12. timer channel 3 status and control register (tsc3) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 287 non-disclosure agreement required chxie ?channel x interrupt enable bit this read/write bit enables tim cpu interrupts service requests on channel x. the dmaxs bit in the timer dma select register selects channel x tim dma service requests or tim cpu interrupt requests. note: tim dma service requests cannot be used in buffered pwm mode. in buffered pwm mode, disable tim dma service requests by clearing the dmaxs bit in the timer dma select register. reset clears the chxe bit. 1 = channel x cpu interrupt requests and dma service requests enabled 0 = channel x cpu interrupt requests and dma service requests disabled note: reading the high byte of the timer channel x registers (tchxh) inhibits the chxf flag until the low byte (tchxl) is read. msxb mode select bit b this read/write bit selects buffered output compare/pwm operation. msxb exists only in the timer channel 0 and timer channel 2 status and control registers. setting ms0b disables the channel 1 status and control register. setting ms2b disables the channel 3 status and control register. reset clears the msxb bit. 1 = buffered output compare/pwm operation enabled 0 = buffered output compare/pwm operation disabled msxa mode select bit a when elsxb:a 00, this read/write bit selects either input capture operation or unbuffered output compare/pwm operation. (see table 16-2 .) 1 = unbuffered output compare/pwm operation 0 = input capture operation when elsxb:a = 00, this read/write bit selects the initial output level of the tchx pin. (see table 16-2 .). reset clears the msxa bit. 1 = initial output level low 0 = initial output level high f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 288 timer interface module (tim) motorola note: before changing a channel function by writing to the msxb or msxa bit, set the tstop and trst bits in the timer status and control register (tsc). elsxb and elsxa ?edge/level select bits when channel x is an input capture channel, these read/write bits control the active edge-sensing logic on channel x. when channel x is an output compare channel, elsxb and elsxa control the channel x output behavior when an output compare occurs. when elsxb and elsxa are both clear, channel x is not connected to port e, and pin tchx is available as a general-purpose i/o pin. table 16-2 shows how elsxb and elsxa work. reset clears the elsxb and elsxa bits. table 16-2. mode, edge, and level selection msxb:msxa elsxb:elsxa mode configuration x0 00 output preset set initial output level high x1 00 set initial output level low xx 00 tchx pin under port control 00 01 input capture capture on rising edge only 00 10 capture on falling edge only 00 11 capture on rising or falling edge xx 00 tchx pin under port control; initial output low 01 01 output compare or pwm toggle output on compare 01 10 clear output on compare 01 11 set output on compare xx 00 tchx pin under port control (1) 1. initial output high if msxa = 0. initial output low if msxa = 1. 1x 01 buffered output compare or buffered pwm toggle output on compare 1x 10 clear output on compare 1x 11 set output on compare f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 289 non-disclosure agreement required note: before enabling a timer channel register for input capture operation, make sure that the tchx pin is stable for at least two bus clocks. tovx ?toggle on overflow bit when channel x is an output compare channel, this read/write bit controls the behavior of the channel x output when the timer counter overflows. when channel x is an input capture channel, tovx has no effect. reset clears the tovx bit. 1 = channel x pin toggles on timer counter overflow. 0 = channel x pin does not toggle on timer counter overflow. note: when tovx is set, a timer counter overflow takes precedence over a channel x output compare if both occur at the same time. reading the high byte of the timer channel x registers prevents the channel x pin from toggling until the low byte is read. chxmax ?channel x maximum (100%) pwm duty cycle bit this read/write bit forces the duty cycle of buffered and unbuffered pwm signals to 100%. as figure 16-13 shows, the chxmax bit takes effect in the cycle after it is set or cleared. the output stays at the 100% duty cycle level until the cycle after chxmax is cleared. figure 16-13. chxmax latency output overflow ptex/tchx period chxmax overflow overflow overflow overflow compare output compare output compare output compare f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 290 timer interface module (tim) motorola 16.9.5 timer channel registers the timer channel registers (tch0h/l?ch3h/l) are read/write registers containing the captured timer counter value of the input capture function or the output compare value of the output compare function. the state of the timer channel registers after reset is unknown. in input capture mode (msxb:msxa = 0:0), reading the high byte of the timer channel x registers (tchxh) inhibits input captures until the low byte (tchxl) is read. in output compare mode (msxb:msxa 0:0), writing to the high byte of the timer channel x registers (tchxh) inhibits output compares until the low byte (tchxl) is written. address: $0027 bit 7 654321 bit 0 read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 00000000 figure 16-14. timer channel 0 register high (tch0h) address: $0028 bit 7 654321 bit 0 read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 00000000 figure 16-15. timer channel 0 register low (tch0l) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
timer interface module (tim) i/o registers mc68hc(9)08lk60 rev. 1.0 advance information motorola timer interface module (tim) 291 non-disclosure agreement required address: $002a bit 7 654321 bit 0 read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 00000000 figure 16-16. timer channel 1 register high (tch1h) address: $002b bit 7 654321 bit 0 read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 00000000 figure 16-17. timer channel 1 register low (tch1l) address: $002d bit 7 654321 bit 0 read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 00000000 figure 16-18. timer channel 2 register high (tch2h) address: $002e bit 7 654321 bit 0 read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 00000000 figure 16-19. timer channel 2 register low (tch2l) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required timer interface module (tim) advance information mc68hc(9)08lk60 rev. 1.0 292 timer interface module (tim) motorola address: $0030 bit 7 654321 bit 0 read: bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 write: reset: 00000000 figure 16-20. timer channel 3 register high (tch3h) address: $0031 bit 7 654321 bit 0 read: bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 write: reset: 00000000 figure 16-21. timer channel 3 register low (tch3l) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola input/output (i/o) ports 293 non-disclosure agreement required advance information mc68hc(9)08lk60 section 17. input/output (i/o) ports 17.1 contents 17.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293 17.3 port a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295 17.3.1 port a data register . . . . . . . . . . . . . . . . . . . . . . . . . . . .295 17.3.2 data direction register a . . . . . . . . . . . . . . . . . . . . . . . . .296 17.4 port b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298 17.4.1 port b data register . . . . . . . . . . . . . . . . . . . . . . . . . . . .298 17.4.2 data direction register b . . . . . . . . . . . . . . . . . . . . . . . . .299 17.5 port c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301 17.5.1 port c data register . . . . . . . . . . . . . . . . . . . . . . . . . . . .301 17.5.2 data direction register c . . . . . . . . . . . . . . . . . . . . . . . . .302 17.2 introduction twenty-four bidirectional input/output (i/o) pins form three parallel ports. all i/o pins are programmable as inputs or outputs. note: connect any unused i/o pins to an appropriate logic level, either v dd or v ss . although the i/o ports do not require termination for proper operation, termination reduces excess current consumption and the possibility of electrostatic damage. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required input/output (i/o) ports advance information mc68hc(9)08lk60 rev. 1.0 294 input/output (i/o) ports motorola addr. register name bit 7 654321 bit 0 $0000 port a data register (pta) read: pta7 pta6 pta5 pta4 pta3 pta2 pta1 pta0 write: reset: unaffected by reset $0001 port b data register (ptb) read: ptb7 ptb6 ptb5 ptb4 ptb3 ptb2 ptb1 ptb0 write: reset: unaffected by reset $0002 port c data register (ptc) read: ptc7 ptc6 ptc5 ptc4 ptc3 ptc2 ptc1 ptc0 write: reset: unaffected by reset $0004 data direction register a (ddra) read: ddra7 ddra6 ddra5 ddra4 ddra3 ddra2 ddra1 ddra0 write: reset: 00000000 $0005 data direction register b (ddrb) read: ddrb7 ddrb6 ddrb5 ddrb4 ddrb3 ddrb2 ddrb1 ddrb0 write: reset: 00000000 $0006 data direction register c (ddrc) read: ddrc7 ddrc6 ddrc5 ddrc4 ddrc3 ddrc2 ddrc1 ddrc0 write: reset: 00000000 figure 17-1. i/o port register summary f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
input/output (i/o) ports port a mc68hc(9)08lk60 rev. 1.0 advance information motorola input/output (i/o) ports 295 non-disclosure agreement required 17.3 port a port a is an 8-bit, general-purpose, bidirectional i/o port. 17.3.1 port a data register the port a data register (pta) contains a data latch for each of the eight port a pins. pta7?ta0 ?port a data bits these read/write bits are software programmable. data direction of each port a pin is under the control of the corresponding bit in data direction register a. reset has no effect on port a data. address: $0000 bit 7 654321 bit 0 read: pta7 pta6 pta5 pta4 pta3 pta2 pta1 pta0 write: reset: unaffected by reset figure 17-2. port a data register (pta) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required input/output (i/o) ports advance information mc68hc(9)08lk60 rev. 1.0 296 input/output (i/o) ports motorola 17.3.2 data direction register a data direction register a (ddra) determines whether each port a pin is an input or an output. writing a logic 1 to a ddra bit enables the output buffer for the corresponding port a pin; a logic 0 disables the output buffer. ddra7?dra0 ?data direction register a bits these read/write bits control port a data direction. reset clears ddra7?dra0, configuring all port a pins as inputs. 1 = corresponding port a pin configured as output 0 = corresponding port a pin configured as input note: avoid glitches on port a pins by writing to the port a data register before changing data direction register a bits from 0 to 1. figure 17-4 shows the port a i/o logic. figure 17-4. port a i/o circuit address: $0004 bit 7 654321 bit 0 read: ddra7 ddra6 ddra5 ddra4 ddra3 ddra2 ddra1 ddra0 write: reset: 00000000 figure 17-3. data direction register a (ddra) read ddra ($0004) write ddra ($0004) reset write pta ($0000) read pta ($0000) ptax ddrax ptax internal data bus f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
input/output (i/o) ports port a mc68hc(9)08lk60 rev. 1.0 advance information motorola input/output (i/o) ports 297 non-disclosure agreement required when bit ddrax is a logic 1, reading address $0000 reads the ptax data latch. when bit ddrax is a logic 0, reading address $0000 reads the voltage level on the pin. the data latch can always be written, regardless of the state of its data direction bit. table 17-1 summarizes the operation of the port a pins. table 17-1. port a pin functions ddra bit pta bit i/o pin mode accesses to ddra accesses to pta read/write read write 0x (1) 1. x = don? care input, hi-z (2) 2. hi-z = high impedance ddra7?dra0 pin pta7?ta0 (3) 3. writing affects data register, but does not affect input. 1 x output ddra7?dra0 pta7?ta0 pta7?ta0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required input/output (i/o) ports advance information mc68hc(9)08lk60 rev. 1.0 298 input/output (i/o) ports motorola 17.4 port b port b is an 8-bit, general-purpose, bidirectional i/o port. 17.4.1 port b data register the port b data register (ptb) contains a data latch for each of the eight port b pins. ptb7?tb0 ?port b data bits these read/write bits are software-programmable. data direction of each port b pin is under the control of the corresponding bit in data direction register b. reset has no effect on port b data. the port b interrupt enable bits, ptb7ie?tb0ie, in the port b interrupt control register (ptbicr) enable the port b pins as external interrupt pins. see section 11. external interrupt module (irq) . address: $0001 bit 7 654321 bit 0 read: ptb7 ptb6 ptb5 ptb4 ptb3 ptb2 ptb1 ptb0 write: reset: unaffected by reset figure 17-5. port b data register (ptb) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
input/output (i/o) ports port b mc68hc(9)08lk60 rev. 1.0 advance information motorola input/output (i/o) ports 299 non-disclosure agreement required 17.4.2 data direction register b data direction register b (ddrb) determines whether each port b pin is an input or an output. writing a logic 1 to a ddrb bit enables the output buffer for the corresponding port b pin; a logic 0 disables the output buffer. ddrb7?drb0 ?data direction register b bits these read/write bits control port b data direction. reset clears ddrb7?drb0, configuring all port b pins as inputs. 1 = corresponding port b pin configured as output 0 = corresponding port b pin configured as input note: avoid glitches on port b pins by writing to the port b data register before changing data direction register b bits from 0 to 1. figure 17-7 shows the port b i/o logic. figure 17-7. port b i/o circuit address: $0005 bit 7 654321 bit 0 read: ddrb7 ddrb6 ddrb5 ddrb4 ddrb3 ddrb2 ddrb1 ddrb0 write: reset: 00000000 figure 17-6. data direction register b (ddrb) read ddrb ($0005) write ddrb ($0005) reset write ptb ($0001) read ptb ($0001) ptbx ddrbx ptbx internal data bus f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required input/output (i/o) ports advance information mc68hc(9)08lk60 rev. 1.0 300 input/output (i/o) ports motorola when bit ddrbx is a logic 1, reading address $0001 reads the ptbx data latch. when bit ddrbx is a logic 0, reading address $0001 reads the voltage level on the pin. the data latch can always be written, regardless of the state of its data direction bit. table 17-2 summarizes the operation of the port b pins. table 17-2. port b pin functions ddrb bit ptb bit i/o pin mode accesses to ddrb accesses to ptb read/write read write 0x (1) 1. x = don? care input, hi-z (2) 2. hi-z = high impedance ddrb7?drb0 pin ptb7?tb0 (3) 3. writing affects data register, but does not affect input. 1 x output ddrb7?drb0 ptb7?tb0 ptb7?tb0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
input/output (i/o) ports port c mc68hc(9)08lk60 rev. 1.0 advance information motorola input/output (i/o) ports 301 non-disclosure agreement required 17.5 port c port c is an 8-bit, general-purpose, bidirectional i/o port. 17.5.1 port c data register the port c data register (ptc) contains a data latch for each of the eight port c pins. ptc7?tc0 ?port c data bits these read/write bits are software-programmable. data direction of each port c pin is under the control of the corresponding bit in data direction register c. reset has no effect on port c data. address: $0002 bit 7 654321 bit 0 read: ptc7 ptc6 ptc5 ptc4 ptc3 ptc2 ptc1 ptc0 write: reset: unaffected by reset figure 17-8. port c data register (ptc) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required input/output (i/o) ports advance information mc68hc(9)08lk60 rev. 1.0 302 input/output (i/o) ports motorola 17.5.2 data direction register c data direction register c (ddrc) determines whether each port c pin is an input or an output. writing a logic 1 to a ddrc bit enables the output buffer for the corresponding port c pin; a logic 0 disables the output buffer. ddrc7?drc0 ?data direction register c bits these read/write bits control port c data direction. reset clears ddrc7?drc0, configuring all port c pins as inputs. 1 = corresponding port c pin configured as output 0 = corresponding port c pin configured as input note: avoid glitches on port c pins by writing to the port c data register before changing data direction register c bits from 0 to 1. figure 17-10 shows the port c i/o logic. figure 17-10. port c i/o circuit address: $0006 bit 7 654321 bit 0 read: ddrc7 ddrc6 ddrc5 ddrc4 ddrc3 ddrc2 ddrc1 ddrc0 write: reset: 00000000 figure 17-9. data direction register c (ddrc) read ddrc ($0006) write ddrc ($0006) reset write ptc ($0002) read ptc ($0002) ptcx ddrcx ptcx internal data bus f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
input/output (i/o) ports port c mc68hc(9)08lk60 rev. 1.0 advance information motorola input/output (i/o) ports 303 non-disclosure agreement required when bit ddrcx is a logic 1, reading address $0002 reads the ptcx data latch. when bit ddrcx is a logic 0, reading address $0002 reads the voltage level on the pin. the data latch can always be written, regardless of the state of its data direction bit. table 17-3 summarizes the operation of the port c pins. table 17-3. port c pin functions ddrc bit ptc bit i/o pin mode accesses to ddrc accesses to ptc read/write read write 0x (1) 1. x = don? care input, hi-z (2) 2. hi-z = high impedance ddrc7?drc0 pin ptc7?tc0 (3) 3. writing affects data register, but does not affect input. 1 x output ddrc7?drc0 ptc7?tc0 ptc7?tc0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required input/output (i/o) ports advance information mc68hc(9)08lk60 rev. 1.0 304 input/output (i/o) ports motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola monitor rom (mon) 305 non-disclosure agreement required advance information mc68hc(9)08lk60 section 18. monitor rom (mon) 18.1 contents 18.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305 18.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305 18.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .306 18.4.1 entering monitor mode . . . . . . . . . . . . . . . . . . . . . . . . . . .308 18.4.2 data format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .309 18.4.3 echoing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310 18.4.4 break signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310 18.4.5 baud rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .314 18.2 introduction this section describes the monitor read-only memory (rom). the monitor rom (mon) allows complete testing of the mcu through a single-wire interface with a host computer. 18.3 features features of the mon include: normal user-mode pin functionality one pin dedicated to serial communication between monitor rom and host computer standard mark/space non-return-to-zero (nrz) communication with host computer 4800-baud to 28.8-kbaud communication with host computer execution of code in random-access memory (ram) or rom f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required monitor rom (mon) advance information mc68hc(9)08lk60 rev. 1.0 306 monitor rom (mon) motorola 18.4 functional description the monitor rom receives and executes commands from a host computer. figure 18-1 shows a sample circuit used to enter monitor mode and communicate with a host computer via a standard rs-232 interface. simple monitor commands can access any memory address. in monitor mode, the mcu can execute host-computer code in ram while all mcu pins retain normal operating mode functions. all communication between the host computer and the mcu is through the pta0 pin. a level-shifting and multiplexing interface is required between pta0 and the host computer. pta0 is used in a wired-or configuration and requires a pullup resistor. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
monitor rom (mon) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola monitor rom (mon) 307 non-disclosure agreement required figure 18-1. monitor mode circuit + + + + 10 m ? x1 v dd v dda v dd + v hi v dd mc145407 mc74hc125 68hc(9)08 rst irq1 irq2 v dda cgmxfc osc1 osc2 ev ss v ss v dd pta0 v dd 10 k ? 0.1 f 0.1 f 10 k ? 10 ? 6 5 4 3 2 1 db-25 2 3 7 20 18 17 19 16 15 v dd v dd v dd 20 pf 20 pf 10 f 10 f 10 f 10 f 1 2 4 7 14 3 0.1 f 4.9152 mhz 10 k ? ptc3 v dd 10 k ? b a note: position a ?bus clock = cgmxclk 4 or cgmvclk 4 position b ?bus clock = cgmxclk 2 (see note.) 5 6 ptc0 ptc1 v dd 10 k ? f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required monitor rom (mon) advance information mc68hc(9)08lk60 rev. 1.0 308 monitor rom (mon) motorola 18.4.1 entering monitor mode table 18-1 shows the pin conditions for entering monitor mode. enter monitor mode by either: executing a software interrupt instruction (swi) or applying a logic 0 and then a logic 1 to the rst pin the mcu sends a break signal (10 consecutive logic 0s) to the host computer, indicating that it is ready to receive a command. the break signal also provides a timing reference to allow the host to determine the necessary baud rate. monitor mode uses alternate vectors for reset, swi, and break interrupt. the alternate vectors are in the $fe page instead of the $ff page and allow code execution from the internal monitor firmware instead of user code. the cop module is disabled in monitor mode as long as v dd +v hi is applied to either the irq1 pin or the rst pin. see section 6. system integration module (sim) for more information on modes of operation. note: holding the ptc3 pin low when entering monitor mode causes a bypass of a divide-by-two stage at the oscillator. the cgmout frequency is equal to the cgmxclk frequency, and the osc1 input directly generates internal bus clocks. in this case, the osc1 signal must have a 50% duty cycle at maximum bus frequency. table 18-1. mode selection irq1 pin ptc0 pin ptc1 pin pta0 pin ptc3 pin mode cgmout bus frequency v dd + v hi 1011 monitor or v dd + v hi 1010 monitor cgmxclk cgmxclk 2 ----------------------------- cgmvclk 2 ----------------------------- cgmout 2 -------------------------- cgmout 2 -------------------------- f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
monitor rom (mon) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola monitor rom (mon) 309 non-disclosure agreement required table 18-2 is a summary of the differences between user mode and monitor mode. 18.4.2 data format communication with the monitor rom is in standard non-return-to-zero (nrz) mark/space data format. (see figure 18-2 and figure 18-3 .) the data transmit and receive rate can be anywhere from 4800 baud to 28.8 kbaud. transmit and receive baud rates must be identical. figure 18-2. monitor data format figure 18-3. sample monitor waveforms table 18-2. mode differences modes functions cop reset vector high reset vector low break vector high break vector low swi vector high swi vector low user enabled $fffe $ffff $fffc $fffd $fffc $fffd monitor (1) 1. if pta0 is low out of reset, the cpu performs a jump to ram for burn-in. disabled (2) 2. if the high voltage (v dd +v hi ) is removed from the irq1 pin or the rst pin, the sim as- serts its cop enable output. $fefe $feff $fefc $fefd $fefc $fefd bit 5 start bit bit 0 bit 1 next stop bit start bit bit 2 bit 3 bit 4 bit 6 bit 7 bit 5 start bit bit 0 bit 1 next stop bit start bit bit 2 bit 3 bit 4 bit 6 bit 7 start bit bit 0 bit 1 next stop bit start bit bit 2 $a5 break bit 3 bit 4 bit 5 bit 6 bit 7 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required monitor rom (mon) advance information mc68hc(9)08lk60 rev. 1.0 310 monitor rom (mon) motorola 18.4.3 echoing as shown in figure 18-4 , the monitor rom immediately echoes each received byte back to the pta0 pin for error checking. any result of a command appears after the echo of the last byte of the command. figure 18-4. read transaction 18.4.4 break signal a start bit followed by nine low bits is a break signal. (see figure 18-5 .) when the monitor receives a break signal, it drives the pta0 pin high for the duration of two bits before echoing the break signal. figure 18-5. break transaction addr. high read read addr. high addr. low addr. low data echo sent to monitor result 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 missing stop bit 2-stop bit delay before 0 echo f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
monitor rom (mon) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola monitor rom (mon) 311 non-disclosure agreement required the monitor rom uses these commands: read (read memory) write (write memory) iread (indexed read) iwrite (indexed write) readsp (read stack pointer) run (run user program) table 18-3. read (read memory) command description read byte from memory operand speci?s 2-byte address in high byte:low byte order data returned returns contents of speci?d address opcode $4a command sequence addr. high read read addr. high addr. low addr. low data echo sent to monitor result table 18-4. write (write memory) command description write byte to memory operand speci?s 2-byte address in high byte:low byte order; low byte followed by data byte data returned none opcode $49 command sequence addr. high write write addr. high addr. low addr. low data echo sent to monitor data f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required monitor rom (mon) advance information mc68hc(9)08lk60 rev. 1.0 312 monitor rom (mon) motorola table 18-5. iread (indexed read) command description read next 2 bytes in memory from last address accessed operand speci?s 2-byte address in high byte:low byte order data returned returns contents of next two addresses opcode $1a command sequence table 18-6. iwrite (indexed write) command description write to last address accessed + 1 operand speci?s single data byte data returned none opcode $19 command sequence data iread iread data echo sent to monitor result data iwrite iwrite data echo sent to monitor f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
monitor rom (mon) functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola monitor rom (mon) 313 non-disclosure agreement required a sequence of iread or iwrite commands can access a block of memory sequentially over the full 64-kbyte memory map. table 18-7. readsp (read stack pointer) command description reads stack pointer operand none data returned returns stack pointer in high byte:low byte order opcode $0c command sequence table 18-8. run (run user program) command description executes rti instruction operand none data returned none opcode $28 command sequence sp high readsp readsp sp low echo sent to monitor result run run echo sent to monitor f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required monitor rom (mon) advance information mc68hc(9)08lk60 rev. 1.0 314 monitor rom (mon) motorola 18.4.5 baud rate with a 4.9152-mhz crystal and the ptc3 pin at logic 1 during reset, data is transferred between the monitor and host at 4800 baud. if the ptc3 pin is at logic 0 during reset, the monitor baud rate is 9600. when the cgm output, cgmout, is driven by the pll, the baud rate is determined by the mul11?ul0 bits in the pll multiplier registers. see section 7. clock generator module (cgmb) . table 18-9. monitor baud rate selection vco frequency multiplier (n) 123456 monitor baud rate 4800 9600 14,400 19,200 24,000 28,800 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola keyboard interrupt (kbi) module 315 non-disclosure agreement required advance information mc68hc(9)08lk60 section 19. keyboard interrupt (kbi) module 19.1 contents 19.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .315 19.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .315 19.4 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .317 19.5 initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318 19.6 wait mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .319 19.7 i/o registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .319 19.7.1 irq status and control register. . . . . . . . . . . . . . . . . . . .319 19.7.2 keyboard interrupt enable register . . . . . . . . . . . . . . . . .319 19.2 introduction the keyboard interrupt (kbi) module provides eight independently maskable external interrupt pins. 19.3 features features include: eight keyboard interrupt pins with separate keyboard interrupt enable bits and one keyboard interrupt mask the keyboard interrupt module shares the 8-bit bidirectional i/o port with port b. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required keyboard interrupt (kbi) module advance information mc68hc(9)08lk60 rev. 1.0 316 keyboard interrupt (kbi) module motorola figure 19-1. block diagram ptb7 kbie7 ptb7 pullup enable ptb0 kbie1 ptb0 pullup enable irq2 pin2 irq2dis ack2 dq ck clr v dd mode2 imask2 irq2/keyboard interrupt latch irq2/kbi interrupt request synchronizer f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
keyboard interrupt (kbi) module functional description mc68hc(9)08lk60 rev. 1.0 advance information motorola keyboard interrupt (kbi) module 317 non-disclosure agreement required 19.4 functional description writing to the kbie7?bie0 bits in the keyboard interrupt enable register independently enables or disables each port b pin as a keyboard interrupt pin. enabling a keyboard interrupt pin also enables its internal pullup device. a logic 0 applied to an enabled keyboard interrupt pin latches a keyboard interrupt request. a keyboard interrupt request is latched when one or more keyboard pins goes low after all were high. vector fetch or software clear a vector fetch generates an interrupt acknowledge signal to clear the interrupt request. software can generate the interrupt acknowledge signal by writing a logic 1 to the ack2, irq2 interrupt request acknowledge bit in the irq status and control register (iscr). the ack2 bit is useful in applications that poll the keyboard interrupt pins and require software to clear the keyboard interrupt request. writing to the ack2 bit in an interrupt service routine can also prevent spurious interrupts due to noise. setting ack2 does not affect subsequent transitions on the keyboard interrupt pins. a falling edge that occurs after writing to the ack2 bit latches another interrupt request. if the keyboard interrupt mask bit, imask2, is clear, the cpu loads the program counter with the vector address at locations $ffd2 and $ffd3. see 19.7.1 irq status and control register . return of all enabled keyboard interrupt pins to logic 1 as long as any enabled keyboard interrupt pin is at logic 0, the keyboard interrupt request remains set. the vector fetch or software clear and the return of all enabled keyboard interrupt pins to logic 1 may occur in any order. reset clears the keyboard interrupt request. the pin2 bit in the iscr can be used to see if a pending interrupt exists. the pin2 bit is not affected by the keyboard interrupt mask bit imask2. see 19.7.1 irq status and control register . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required keyboard interrupt (kbi) module advance information mc68hc(9)08lk60 rev. 1.0 318 keyboard interrupt (kbi) module motorola to determine the logic level on a keyboard interrupt pin, use the data direction register to configure the pin as an input and read the data register. note: setting a keyboard interrupt enable bit (kbiex) forces the corresponding keyboard interrupt pin to be an input, overriding the data direction register. however, the data direction register bit must be a logic 0 for software to read the pin. 19.5 initialization when a keyboard interrupt pin is enabled, it takes time for the internal pullup to reach a logic 1. therefore, a false interrupt can occur as soon as the pin is enabled. to prevent a false interrupt on keyboard initialization: 1. mask keyboard interrupts by setting the imask2 bit in the iscr. see 19.7.1 irq status and control register . 2. enable the kbi pins by setting the appropriate kbiex bits in the keyboard interrupt enable register. 3. write to the ack2 bit in the iscr to clear any false interrupts. see 19.7.1 irq status and control register . 4. clear the imask2 bit. an interrupt signal on an edge-triggered pin can be acknowledged immediately after enabling the pin. another way to avoid a false interrupt: 1. configure the keyboard pins as outputs by setting the appropriate ddrb bits in data direction register b. 2. write logic 1s to the appropriate port b data register bits. 3. enable the kbi pins by setting the appropriate kbiex bits in the keyboard interrupt enable register. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
keyboard interrupt (kbi) module wait mode mc68hc(9)08lk60 rev. 1.0 advance information motorola keyboard interrupt (kbi) module 319 non-disclosure agreement required 19.6 wait mode the keyboard interrupt module remains active in wait mode. clearing the iask2 bit in the iscr enables keyboard interrupt requests to bring the mcu out of wait mode. 19.7 i/o registers these registers control and monitor operation of the keyboard interrupt module: irq status and control register (iscr) keyboard interrupt enable register (kbier) 19.7.1 irq status and control register see 11.6 irq status and control register . 19.7.2 keyboard interrupt enable register the keyboard interrupt enable register enables or disables each port b pin to operate as a keyboard interrupt pin. kbie7?bie0 ?keyboard interrupt enable bits each of these read/write bits enables the corresponding keyboard interrupt pin to latch interrupt requests. reset clears the keyboard interrupt enable register. 1 = pbx pin enabled as keyboard interrupt pin 0 = pbx pin not enabled as keyboard interrupt pin address: $0003 bit 7 654321 bit 0 read: kbie7 kbie6 kbie5 kbie4 kbie3 kbie2 kbie1 kbie0 write: reset: 00000000 figure 19-2. keyboard interrupt enable register (kbier) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required keyboard interrupt (kbi) module advance information mc68hc(9)08lk60 rev. 1.0 320 keyboard interrupt (kbi) module motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola preliminary electrical specifications 321 non-disclosure agreement required advance information mc68hc(9)08lk60 section 20. preliminary electrical specifications 20.1 contents 20.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321 20.3 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . .322 20.4 functional operating range. . . . . . . . . . . . . . . . . . . . . . . . . .323 20.5 thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323 20.6 3.0 volt 10% dc electrical characteristics . . . . . . . . . . . . .324 20.7 2.0 volt 10% dc electrical characteristics . . . . . . . . . . . . .325 20.8 3.0 volt 10% control timing . . . . . . . . . . . . . . . . . . . . . . .326 20.9 2.0 volt 10% control timing . . . . . . . . . . . . . . . . . . . . . . .326 20.10 3.0 volt 10% serial peripheral interface (spi) timing . . . . .327 20.11 2.0 volt 10% serial peripheral interface (spi) timing . . . . .328 20.12 pll2p12m electrical specifications . . . . . . . . . . . . . . . . . . .331 20.13 bus clock pll acquisition/lock time specifications . . . . . . .332 20.14 pll2p12m component specifications . . . . . . . . . . . . . . . . . .333 20.15 ram characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334 20.16 flash memory electrical characteristics . . . . . . . . . . . . . . .334 20.2 introduction this section contains preliminary electrical and timing specifications. these values are design targets and have not yet been tested. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required preliminary electrical speci?ations advance information mc68hc(9)08lk60 rev. 1.0 322 preliminary electrical specifications motorola 20.3 absolute maximum ratings maximum ratings are the extreme limits to which the mcu can be exposed without permanently damaging it. the mcu contains circuitry to protect the inputs against damage from high static voltages; however, do not apply voltages higher than those shown in this table. keep v in and v out within the range v ss (v in or v out ) v dd . connect unused inputs to the appropriate voltage level, either v ss or v dd . note: this device is not guaranteed to operate properly at the maximum ratings. refer to 20.6 3.0 volt 10% dc electrical characteristics and 20.7 2.0 volt 10% dc electrical characteristics for guaranteed operating conditions. electrostatic discharge (esd) protection is provided on each pin to 2000 volts using the human body model of 100 pf and 1500 ohms. using the machine model, esd protection is provided to 200 volts at 100 pf and 0 ohms. rating symbol value unit supply voltage v dd ?.3 to +3.6 v input voltage v in v ss ?.3 to v dd +0.3 v maximum current per pin excluding v dd and v ss i 25 ma storage temperature t stg ?5 to +150 c maximum current out of v ss i mvss 100 ma maximum current into v dd i mvdd 100 ma note: voltages are referenced to v ss . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
preliminary electrical specifications functional operating range mc68hc(9)08lk60 rev. 1.0 advance information motorola preliminary electrical specifications 323 non-disclosure agreement required 20.4 functional operating range 20.5 thermal characteristics rating symbol value (1) 1. tested and guaranteed at room temperature only unit operating temperature range t a ?0 to +65 c operating voltage range (2) 2. lcd charge pump optimized for given ranges v dd 2.0 10% 3.0 10% v lcd operating voltage range (3) 3. v ll does not have to equal v dd . v ll 2.0 10% 3.0 10% v characteristic symbol value unit thermal resistance, 160 bga mc68hc08lk60 MC68HC908LK60 ja 61 50 c/w i/o pin power dissipation p i/o user determined w power dissipation (1) 1. power dissipation is a function of temperature. p d p d = (i dd x v dd ) + p i/o = k/(t j + 273 c) w constant (2) 2. k is a constant unique to the device. k can be determined from a known t a and measured p d . with this value of k, p d and t j can be determined for any value of t a . k p d x (t a + 273 c) + (p d 2 x ja ) w/ c average junction temperature t j t a = p d ja c maximum junction temperature t jm 100 c f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required preliminary electrical speci?ations advance information mc68hc(9)08lk60 rev. 1.0 324 preliminary electrical specifications motorola 20.6 3.0 volt 10% dc electrical characteristics characteristic (1) 1. v dd = 3.0 vdc 10%, v ss = 0 vdc, t a = ?0 c to +65 c, unless otherwise noted. symbol min typ (2) 2. typical values reflect average measurements at midpoint of voltage range, 25 c only. max unit output high voltage (i load = ?.4 ma) all pins v oh 0.7 x v dd v output low voltage (i load = 0.8 ma) all pins v ol 0.3 x v dd v input high voltage all ports, irqs, reset, osc1 v ih 0.7 x v dd ? dd v input low voltage all ports, irqs, reset, osc1 v il v ss 0.3 x v dd v monitor mode entry voltage v hi v dd v v dd supply current run (3) wait (4) 3. run (operating) i dd measured using external square wave clock source (f op = 4.1 mhz). all inputs 0.2 v from rail. no dc loads. less than 100 pf on all outputs. c l = 20 pf on osc2. all ports configured as inputs. osc2 capacitance linearly affects run i dd . measured with all modules enabled. 4. wait i dd measured using external square wave clock source (f op = 4.1 mhz). all inputs 0.2 v from rail. no dc loads. less than 100 pf on all outputs. c l = 20 pf on osc2. all ports configured as inputs. osc2 capacitance linearly affects wait i dd . measured with pll, lcd, and tbm disabled. i dd 4 2 ma i/o ports high-impedance leakage current i il 10 a input current i in 1 a capacitance ports (as input or output) c out c in 12 8 pf por rearm voltage (5) 5. maximum is highest voltage that por is guaranteed. v por 0 200 mv por reset voltage (6) 6. maximum is highest voltage that por is possible. v porrst 0 700 800 mv por rise time ramp rate (7) 7. if minimum v dd is not reached before the internal por reset is released, rstb must be driven low externally until mini- mum v dd is reached. r por 0.02 v/ms f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
preliminary electrical specifications 2.0 volt 10% dc electrical characteristics mc68hc(9)08lk60 rev. 1.0 advance information motorola preliminary electrical specifications 325 non-disclosure agreement required 20.7 2.0 volt 10% dc electrical characteristics characteristic (1) 1. v dd = 2.0 vdc 10%, v ss = 0 vdc, t a = ?0 c to +65 c, unless otherwise noted. symbol min typ (2) 2. typical values reflect average measurements at midpoint of voltage range, 25 c only. max unit output high voltage (i load = ?.4 ma) all pins v oh 0.7 x v dd v output low voltage (i load = 0.8 ma) all pins v ol 0.3 x v dd v input high voltage all ports, irqs, reset, osc1 v ih 0.7 x v dd ? dd v input low voltage all ports, irqs, reset, osc1 v il v ss 0.3 x v dd v monitor mode entry voltage v hi v dd v v dd supply current run (3) wait (4) 3. run (operating) i dd measured using external square wave clock source (f op = 2 mhz). all inputs 0.2 v from rail. no dc loads. less than 100 pf on all outputs. c l = 20 pf on osc2. all ports configured as inputs. osc2 capacitance linearly affects run i dd . measured with all modules enabled. 4. wait i dd measured using external square wave clock source (f op = 2 mhz). all inputs 0.2 v from rail. no dc loads. less than 100 pf on all outputs. c l = 20 pf on osc2. all ports configured as inputs. osc2 capacitance linearly affects wait i dd . measured with pll, lcd, and tbm disabled. i dd 2 1 ma i/o ports high-impedance leakage current i il 10 a input current i in 1 a capacitance ports (as input or output) c out c in 12 8 pf por rearm voltage (5) 5. maximum is highest voltage that por is guaranteed. v por 0 200 mv por reset voltage (6) 6. maximum is highest voltage that por is possible. v porrst 0 700 800 mv por rise time ramp rate (7) 7. if minimum v dd is not reached before the internal por reset is released, rstb must be driven low externally until mini- mum v dd is reached. r por 0.02 v/ms f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required preliminary electrical speci?ations advance information mc68hc(9)08lk60 rev. 1.0 326 preliminary electrical specifications motorola 20.8 3.0 volt 10% control timing 20.9 2.0 volt 10% control timing characteristic (1) 1. v dd = 3.0 vdc 10%, v ss = 0 vdc; timing shown with respect to 20% v dd and 70% v ss unless otherwise noted symbol min max unit frequency of operation, (2) crystal option 2. see 20.12 pll2p12m electrical specifications for more information. f osc 32 100 khz internal operating frequency f op 4.0 mhz internal bus cycle time t cyc 250 ns reset input pulse width low (3) 3. minimum pulse width reset is guaranteed to be recognized; it is possible for a smaller pulse width to cause a reset. t irl 125 ns irq interrupt pulse width low, (4) edge-triggered 4. minimum pulse width is for guaranteed interrupt; it is possible for a smaller pulse width to be recognized. t ilih 125 ns characteristic (1) 1. v dd = 2.0 vdc 10%, v ss = 0 vdc; timing shown with respect to 20% v dd and 70% v ss unless otherwise noted symbol min max unit frequency of operation, (2) crystal option 2. see 20.12 pll2p12m electrical specifications for more information. f osc 32 100 khz internal operating frequency f op 2.0 mhz internal bus cycle time t cyc 500 ns reset input pulse width low (3) 3. minimum pulse width reset is guaranteed to be recognized; it is possible for a smaller pulse width to cause a reset. t irl 125 ns irq interrupt pulse width low, (4) edge-triggered 4. minimum pulse width is for guaranteed interrupt; it is possible for a smaller pulse width to be recognized. t ilih 125 ns f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
preliminary electrical specifications 3.0 volt 10% serial peripheral interface (spi) timing mc68hc(9)08lk60 rev. 1.0 advance information motorola preliminary electrical specifications 327 non-disclosure agreement required 20.10 3.0 volt 10% serial peripheral interface (spi) timing num (1) 1. item numbers refer to dimensions in figure 20-1 and figure 20-2 . characteristic (2) 2. all timing is shown with respect to 20% v dd and 70% v dd , unless otherwise noted; assumes 100 pf load on all spi pins. symbol min max unit operating frequency master slave f op( m ) f op( s ) f op /128 dc f op /2 f op mhz 1 cycle time master slave t cyc( m ) t cyc( s ) 2 1 128 t cyc 2 enable lead time t lead 30 ns 3 enable lag time t lag 30 ns 4 clock (sck) high time master slave t w ( sckh ) m t w ( sckh ) s 200 100 ns 5 clock (sck) low time master slave t w ( sckl ) m t w ( sckl ) s 200 100 ns 6 data setup time, inputs master slave t su ( m ) t su ( s ) 90 10 ns 7 data hold time, inputs master slave t h ( m ) t h ( s ) 0 30 ns 8 access time, slave (3) cpha = 0 cpha = 1 3. time to data active from high-impedance state t a(cp0) t a(cp1) 0 0 80 40 ns 9 slave disable time, hold time to high-impedance state (4) 4. hold time to high-impedance state t dis ?0ns 10 data valid time after enable edge (5) master slave 5. with 100 pf on all spi pins t v ( m ) t v ( s ) 20 80 ns 11 data hold time, outputs, after enable edge master slave t ho ( m ) t ho ( s ) 0 10 ns f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required preliminary electrical speci?ations advance information mc68hc(9)08lk60 rev. 1.0 328 preliminary electrical specifications motorola 20.11 2.0 volt 10% serial peripheral interface (spi) timing num (1) 1. item numbers refer to dimensions in figure 20-1 and figure 20-2 . characteristic (2) 2. all timing is shown with respect to 20% v dd and 70% v dd , unless otherwise noted; assumes 100 pf load on all spi pins. symbol min max unit operating frequency master slave f op( m ) f op( s ) f op /128 dc f op /2 f op mhz 1 cycle time master slave t cyc( m ) t cyc( s ) 2 1 128 t cyc 2 enable lead time t lead 60 ns 3 enable lag time t lag 60 ns 4 clock (sck) high time master slave t w ( sckh ) m t w ( sckh ) s 400 200 ns 5 clock (sck) low time master slave t w ( sckl ) m t w ( sckl ) s 400 200 ns 6 data setup time, inputs master slave t su ( m ) t su ( s ) 180 20 ns 7 data hold time, inputs master slave t h ( m ) t h ( s ) 0 60 ns 8 access time, slave (3) cpha = 0 cpha = 1 3. time to data active from high-impedance state t a(cp0) t a(cp1) 0 0 160 80 ns 9 slave disable time, hold time to high-impedance state (4) 4. hold time to high-impedance state t dis 100 ns 10 data valid time after enable edge (5) master slave 5. with 100 pf on all spi pins t v ( m ) t v ( s ) 40 160 ns 11 data hold time, outputs, after enable edge master slave t ho ( m ) t ho ( s ) 0 2 ns f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
preliminary electrical specifications 2.0 volt 10% serial peripheral interface (spi) timing mc68hc(9)08lk60 rev. 1.0 advance information motorola preliminary electrical specifications 329 non-disclosure agreement required figure 20-1. spi master timing note note: this first clock edge is generated internally, but is not seen at the sck pin. ss pin of master held high. msb in ss input sck (cpol = 0) output sck (cpol = 1) output miso input mosi output note 4 5 5 1 4 bits 6? lsb in master msb out bits 6? master lsb out 10 11 10 11 7 6 note note: this last clock edge is generated internally, but is not seen at the sck pin. ss pin of master held high. msb in ss input sck (cpol = 0) output sck (cpol = 1) output miso input mosi output note 4 5 5 1 4 bits 6? lsb in master msb out bits 6? master lsb out 10 11 10 11 7 6 a) spi master timing (cpha = 0) b) spi master timing (cpha = 1) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required preliminary electrical speci?ations advance information mc68hc(9)08lk60 rev. 1.0 330 preliminary electrical specifications motorola figure 20-2. spi slave timing note: not defined but normally msb of character just received. slave ss input sck (cpol = 0) input sck (cpol = 1) input miso input mosi output 4 5 5 1 4 msb in bits 6? 8 6 10 11 11 note slave lsb out 9 3 lsb in 2 7 bits 6? msb out note: not defined but normally lsb of character previously transmitted. slave ss input sck (cpol = 0) input sck (cpol = 1) input miso output mosi input 4 5 5 1 4 msb in bits 6? 8 6 10 note slave lsb out 9 3 lsb in 2 7 bits 6? msb out 10 a) spi slave timing (cpha = 0) b) spi slave timing (cpha = 1) 11 11 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
preliminary electrical specifications pll2p12m electrical specifications mc68hc(9)08lk60 rev. 1.0 advance information motorola preliminary electrical specifications 331 non-disclosure agreement required 20.12 pll2p12m electrical specifications description symbol min typ max notes cgmxclk reference frequency f rclk 38.4 khz range nominal multiplier (hz) f nom 38.4 k vco center-of-range frequency (hz) f vrs 38.4 k 38.4 k 20.0 m 10.0 m 2.7?.3 v v dd only 1.8?.7 v v dd vco range linear range multiplier l 1 e = 0 64 e = 0 255 e = 3 vco power-of-two range multiplier 2 e 11 8 vco multiply factor n 1 64 4095 vco prescale multiplier 2 p 1 p = 0 1 p = 0 8 p = 3 reference divider factor r 1 1 15 vco operating frequency f vclk f vrsmin ? vrsmax bus operating frequency (hz) f bus 4 m 2 m 2.7?.3 v v dd only 1.8?.7 v v dd only f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required preliminary electrical speci?ations advance information mc68hc(9)08lk60 rev. 1.0 332 preliminary electrical specifications motorola 20.13 bus clock pll acquisition/lock time specifications this section provides specifications for the entry and exit of acquisition and tracking modes, as well as required manual mode delay times. description symbol min typ max notes filter capacitor multiply factor c fact 0.0145 f/sv acquisition mode time factor k acq 0.117 v tracking mode time factor k trk 0.021 v manual mode time to stable t acq 10 ms if c f chosen correctly manual stable to lock time t al 20 ms if c f chosen correctly manual acquisition time t lock ? acq + t al tracking mode entry frequency tolerance ? trk 0 3.6% acquisition mode entry frequency tolerance ? acq 6.3% 7.2% lock entry frequency tolerance ? lock 0 0.9% lock exit frequency tolerance ? unl 0.9% 1.8% reference cycles per acquisition mode measurement n acq ?2 reference cycles per tracking mode measurement n trk 128 automatic mode time to stable t acq n acq /f rdv 10 ms if c f chosen correctly automatic stable to lock time t al n trk /f rdv 15 ms if c f chosen correctly automatic lock time t lock ? acq + t al f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
preliminary electrical specifications pll2p12m component specifications mc68hc(9)08lk60 rev. 1.0 advance information motorola preliminary electrical specifications 333 non-disclosure agreement required 20.14 pll2p12m component specifications characteristic symbol min typ max notes crystal load capacitance c l consult crystal manufacturers data crystal ?ed capacitance c 1 2 x c l consult crystal manufacturers data crystal tuning capacitance c 2 2 x c l consult crystal manufacturers data feedback bias resistor r b 22 m ? series resistor r s 0 330 k ? 1 m ? not required filter capacitor c f c fact (v dda /f xclk ) bypass capacitor c byp 0.1 f c byp must provide low ac impedance from f=f xclk /100 to 100 x f vclk , so series resistance must be considered. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required preliminary electrical speci?ations advance information mc68hc(9)08lk60 rev. 1.0 334 preliminary electrical specifications motorola 20.15 ram characteristics 20.16 flash memory electrical characteristics characteristic symbol min typ max unit ram data retention voltage v rdr 0.7 v parameter description min typ max units t erase erase time 40 80 110 ms t kill high voltage kill time 200 200 s t hvd return to read mode time 50 50 s t step program step size 0.8 1.0 1.2 ms pulses number of program pulses/page 1 8 10 pulses t hvtv hven low to verf high time 50 s t vtp verf high to pgm low time 150 s endurance erase/program cycles 100 cycles pump clock frequency charge pump frequency 1.8 2.5 mhz f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola mechanical data 335 non-disclosure agreement required advance information mc68hc(9)08lk60 section 21. mechanical data 21.1 contents 21.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335 21.3 160 input/output, bga, standard map, 15 x 15 package (case #1268) . . . . . . . . . . . . . . . . . . . . .336 21.4 wire bond information (mcw68hc08lk60) . . . . . . . . . . . . .337 21.4.1 die pad coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337 21.4.2 die layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .342 21.5 bump wafer information (mccf68hc08lk60) . . . . . . . . . . .343 21.5.1 bump specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343 21.5.2 bumped wafer pad coordinates. . . . . . . . . . . . . . . . . . . .344 21.5.3 die feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349 21.5.4 t and r die orientation. . . . . . . . . . . . . . . . . . . . . . . . . . .349 21.2 introduction this section provides the latest information available at time of publication. to make sure that you have the latest package specifications, contact one of the following: local motorola sales office motorola fax back system (mfax) phone 1-602-244-6609 email rmfax0@email.sps.mot.com; http://sps.motorola.com/mfax/ worldwide web (wwweb) home page at http://www.mot-sps.com/cgi-bin/cases follow mfax or wwweb on-line instructions to retrieve the current mechanical specifications. mfax is a trademark of motorola, inc. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required mechanical data advance information mc68hc(9)08lk60 rev. 1.0 336 mechanical data motorola 21.3 160 input/output, bga, standard map, 15 x 15 package (case #1268) x 0.20 laser mark for pin 1 identification in this area e 13x d e m s a1 a2 a 0.15 z 0.30 z z rotated 90 clockwise detail k  5 view m?m e 13x s m x 0.30 y z 0.10 z 3 b 160x metalized mark for pin 1 identification in this area 14 13 12 11 10 9 6 5 4 3 2 1 a b c d e f g h j k l m n p 4 160x notes: 1. dimensions are in millimeters. 2. interpret dimensions and tolerances per asme y14.5m, 1994. 3. dimension b is measured at the maximum solder ball diameter, parallel to datum plane z. 4. datum z (seating plane) is defined by the spherical crowns of the solder balls. 5. parallelism measurement shall exclude any effect of mark on top surface of package. dim min max millimeters a 1.32 1.75 a1 0.27 0.47 a2 1.18 ref b 0.35 0.65 d 15.00 bsc e 15.00 bsc e 1.00 bsc s 0.50 bsc y k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mechanical data wire bond information (mcw68hc08lk60) mc68hc(9)08lk60 rev. 1.0 advance information motorola mechanical data 337 non-disclosure agreement required 21.4 wire bond information (mcw68hc08lk60) 21.4.1 die pad coordinates table 21-1. die pad coordinates (sheet 1 of 5) pad number pad function x (microns) x (mils) y (microns) y (mils) 1ev dd ?604.3 ?02.53 2519.4 99.19 2ev ss ?604.3 ?02.53 2386.8 93.97 3v dda ?604.3 ?02.53 2254.2 88.75 4 cgmxfc ?604.3 ?02.53 2121.6 83.53 5 osc1 ?604.3 ?02.53 1989 78.31 6 osc2 ?604.3 ?02.53 1856.4 73.09 7v ssa ?604.3 ?02.53 1723.8 67.87 8v dd ?604.3 ?02.53 1591.2 62.65 9v ss ?604.3 ?02.53 1458.6 57.43 10 lcdbp0 ?604.3 ?02.53 1326 52.20 11 lcdbp1 ?604.3 ?02.53 1193.4 46.98 12 lcdbp2 ?604.3 ?02.53 1060.8 41.76 13 lcdbp3 ?604.3 ?02.53 928.2 36.54 14 lcdfp1 ?604.3 ?02.53 795.6 31.32 15 lcdfp2 ?604.3 ?02.53 663 26.10 16 lcdfp3 ?604.3 ?02.53 530.4 20.88 17 lcdfp4 ?604.3 ?02.53 397.8 15.66 18 lcdfp5 ?604.3 ?02.53 265.2 10.44 19 lcdfp6 ?604.3 ?02.53 132.6 5.22 20 lcdfp7 ?604.3 ?02.53 0 0.00 21 lcdfp8 ?604.3 ?02.53 ?32.6 ?.22 22 lcdfp9 ?604.3 ?02.53 ?65.2 ?0.44 23 lcdfp10 ?604.3 ?02.53 ?97.8 ?5.66 24 lcdfp11 ?604.3 ?02.53 ?30.4 ?0.88 25 lcdfp12 ?604.3 ?02.53 ?63 ?6.10 26 lcdfp13 ?604.3 ?02.53 ?95.6 ?1.32 27 lcdfp14 ?604.3 ?02.53 ?28.2 ?6.54 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required mechanical data advance information mc68hc(9)08lk60 rev. 1.0 338 mechanical data motorola 28 lcdfp15 ?604.3 ?02.53 ?060.8 ?1.76 29 lcdfp16 ?604.3 ?02.53 ?193.4 ?6.98 30 lcdfp17 ?604.3 ?02.53 ?326 ?2.20 31 lcdfp18 ?604.3 ?02.53 ?458.6 ?7.43 32 lcdfp19 ?604.3 ?02.53 ?591.2 ?2.65 33 lcdfp20 ?604.3 ?02.53 ?723.8 ?7.87 34 lcdfp21 ?604.3 ?02.53 ?856.4 ?3.09 35 lcdfp22 ?604.3 ?02.53 ?989 ?8.31 36 lcdfp23 ?604.3 ?02.53 ?121.6 ?3.53 37 lcdfp24 ?604.3 ?02.53 ?254.2 ?8.75 38 lcdfp25 ?604.3 ?02.53 ?386.8 ?3.97 39 lcdfp26 ?604.3 ?02.53 ?519.4 ?9.19 40 lcdfp27 ?320.5 ?1.36 ?803.2 ?10.36 41 lcdfp28 ?187.9 ?6.14 ?803.2 ?10.36 42 lcdfp29 ?055.3 ?0.92 ?803.2 ?10.36 43 lcdfp30 ?922.7 ?5.70 ?803.2 ?10.36 44 lcdfp31 ?790.1 ?0.48 ?803.2 ?10.36 45 lcdfp32 ?657.5 ?5.26 ?803.2 ?10.36 46 lcdfp33 ?524.9 ?0.04 ?803.2 ?10.36 47 lcdfp34 ?392.3 ?4.81 ?803.2 ?10.36 48 lcdfp35 ?259.7 ?9.59 ?803.2 ?10.36 49 lcdfp36 ?127.1 ?4.37 ?803.2 ?10.36 50 lcdfp37 ?94.5 ?9.15 ?803.2 ?10.36 51 lcdfp38 ?61.9 ?3.93 ?803.2 ?10.36 52 lcdfp39 ?29.3 ?8.71 ?803.2 ?10.36 53 lcdfp40 ?96.7 ?3.49 ?803.2 ?10.36 54 lcdfp41 ?64.1 ?8.27 ?803.2 ?10.36 55 lcdfp42 ?31.5 ?3.05 ?803.2 ?10.36 56 lcdfp43 ?98.9 ?.83 ?803.2 ?10.36 57 v ll ?6.3 ?.61 ?803.2 ?10.36 58 vcp1 66.3 2.61 ?803.2 ?10.36 table 21-1. die pad coordinates (sheet 2 of 5) pad number pad function x (microns) x (mils) y (microns) y (mils) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mechanical data wire bond information (mcw68hc08lk60) mc68hc(9)08lk60 rev. 1.0 advance information motorola mechanical data 339 non-disclosure agreement required 59 vcp2 198.9 7.83 ?803.2 ?10.36 60 vcp3 331.5 13.05 ?803.2 ?10.36 61 vcp4 464.1 18.27 ?803.2 ?10.36 62 v ll12 596.7 23.49 ?803.2 ?10.36 63 v ll32 729.3 28.71 ?803.2 ?10.36 64 lcdfp44 861.9 33.93 ?803.2 ?10.36 65 lcdfp45 994.5 39.15 ?803.2 ?10.36 66 lcdfp46 1127.1 44.37 ?803.2 ?10.36 67 lcdfp47 1259.7 49.59 ?803.2 ?10.36 68 lcdfp48 1392.3 54.81 ?803.2 ?10.36 69 lcdfp49 1524.9 60.04 ?803.2 ?10.36 70 lcdfp50 1657.5 65.26 ?803.2 ?10.36 71 lcdfp51 1790.1 70.48 ?803.2 ?10.36 72 lcdfp52 1922.7 75.70 ?803.2 ?10.36 73 lcdfp53 2055.3 80.92 ?803.2 ?10.36 74 lcdfp54 2187.9 86.14 ?803.2 ?10.36 75 lcdfp55 2320.5 91.36 ?803.2 ?10.36 76 lcdfp56 2604.3 102.53 ?519.4 ?9.19 77 lcdfp57 2604.3 102.53 ?386.8 ?3.97 78 lcdfp58 2604.3 102.53 ?254.2 ?8.75 79 lcdfp59 2604.3 102.53 ?121.6 ?3.53 80 lcdfp60 2604.3 102.53 ?989 ?8.31 81 lcdfp61 2604.3 102.53 ?856.4 ?3.09 82 lcdfp62 2604.3 102.53 ?723.8 ?7.87 83 lcdfp63 2604.3 102.53 ?591.2 ?2.65 84 lcdfp64 2604.3 102.53 ?458.6 ?7.43 85 lcdfp65 2604.3 102.53 ?326 ?2.20 86 lcdfp66 2604.3 102.53 ?193.4 ?6.98 87 lcdfp67 2604.3 102.53 ?060.8 ?1.76 88 lcdfp68 2604.3 102.53 ?28.2 ?6.54 89 lcdfp69 2604.3 102.53 ?95.6 ?1.32 table 21-1. die pad coordinates (sheet 3 of 5) pad number pad function x (microns) x (mils) y (microns) y (mils) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required mechanical data advance information mc68hc(9)08lk60 rev. 1.0 340 mechanical data motorola 90 lcdfp70 2604.3 102.53 ?63 ?6.10 91 lcdfp71 2604.3 102.53 ?30.4 ?0.88 92 lcdfp72 2604.3 102.53 ?97.8 ?5.66 93 lcdfp73 2604.3 102.53 ?65.2 ?0.44 94 lcdfp74 2604.3 102.53 ?32.6 ?.22 95 lcdfp75 2604.3 102.53 0 0.00 96 lcdfp76 2604.3 102.53 132.6 5.22 97 lcdfp77 2604.3 102.53 265.2 10.44 98 lcdfp78 2604.3 102.53 397.8 15.66 99 lcdfp79 2604.3 102.53 530.4 20.88 100 lcdfp80 2604.3 102.53 663 26.10 101 lcdfp81 2604.3 102.53 795.6 31.32 102 lcdfp82 2604.3 102.53 928.2 36.54 103 lcdfp83 2604.3 102.53 1060.8 41.76 104 lcdfp84 2604.3 102.53 1193.4 46.98 105 lcdfp85 2604.3 102.53 1326 52.20 106 lcdbp4 2604.3 102.53 1458.6 57.43 107 lcdbp5 2604.3 102.53 1591.2 62.65 108 lcdbp6 2604.3 102.53 1723.8 67.87 109 lcdbp7 2604.3 102.53 1856.4 73.09 110 v ss 2604.3 102.53 1989 78.31 111 v dd 2604.3 102.53 2121.6 83.53 112 alert 2604.3 102.53 2254.2 88.75 113 ekbib 2604.3 102.53 2386.8 93.97 114 ev ss 2604.3 102.53 2519.4 99.19 115 ev dd 2320.5 91.36 2803.2 110.36 116 ptc0 2187.9 86.14 2803.2 110.36 117 ptc1 2055.3 80.92 2803.2 110.36 118 ptc2 1922.7 75.70 2803.2 110.36 119 ptc3 1790.1 70.48 2803.2 110.36 120 ptc4 1657.5 65.26 2803.2 110.36 table 21-1. die pad coordinates (sheet 4 of 5) pad number pad function x (microns) x (mils) y (microns) y (mils) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mechanical data wire bond information (mcw68hc08lk60) mc68hc(9)08lk60 rev. 1.0 advance information motorola mechanical data 341 non-disclosure agreement required 121 ptc5 1524.9 60.04 2803.2 110.36 122 ptc6 1392.3 54.81 2803.2 110.36 123 ptc7 1259.7 49.59 2803.2 110.36 124 ev ss 1127.1 44.37 2803.2 110.36 125 ptb0 994.5 39.15 2803.2 110.36 126 ptb1 861.9 33.93 2803.2 110.36 127 ptb2 729.3 28.71 2803.2 110.36 128 ptb3 596.7 23.49 2803.2 110.36 129 ptb4 464.1 18.27 2803.2 110.36 130 ptb5 331.5 13.05 2803.2 110.36 131 ptb6 198.9 7.83 2803.2 110.36 132 ptb7 66.3 2.61 2803.2 110.36 133 pta0 ?6.3 ?.61 2803.2 110.36 134 pta1 ?98.9 ?.83 2803.2 110.36 135 pta2 ?31.5 ?3.05 2803.2 110.36 136 pta3 ?64.1 ?8.27 2803.2 110.36 137 pta4 ?96.7 ?3.49 2803.2 110.36 138 pta5 ?29.3 ?8.71 2803.2 110.36 139 pta6 ?61.9 ?3.93 2803.2 110.36 140 pta7 ?94.5 ?9.15 2803.2 110.36 141 irq2b ?127.1 ?4.37 2803.2 110.36 142 irq1b ?259.7 ?9.59 2803.2 110.36 143 ev ss ?392.3 ?4.81 2803.2 110.36 144 sck ?524.9 ?0.04 2803.2 110.36 145 mosi ?657.5 ?5.26 2803.2 110.36 146 miso ?790.1 ?0.48 2803.2 110.36 147 ssb ?922.7 ?5.70 2803.2 110.36 148 tdo ?055.3 ?0.92 2803.2 110.36 149 rdi ?187.9 ?6.14 2803.2 110.36 150 rstb ?320.5 ?1.36 2803.2 110.36 table 21-1. die pad coordinates (sheet 5 of 5) pad number pad function x (microns) x (mils) y (microns) y (mils) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required mechanical data advance information mc68hc(9)08lk60 rev. 1.0 342 mechanical data motorola 21.4.2 die layout figure 21-1. 68hc08lk60 die layout f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mechanical data bump wafer information (mccf68hc08lk60) mc68hc(9)08lk60 rev. 1.0 advance information motorola mechanical data 343 non-disclosure agreement required 21.5 bump wafer information (mccf68hc08lk60) 21.5.1 bump specification figure 21-2. bump specification smd electroplated bump : dimensions before probe tiwn x /tiw/cu die passivation lk60 bump sputtered layers cu stud reflowed solder 63%sn 5% 45 5 m 118 +10/-5 m al pad 160 5 m ref. 4.9-6.7 mils c l f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required mechanical data advance information mc68hc(9)08lk60 rev. 1.0 344 mechanical data motorola 21.5.2 bumped wafer pad coordinates table 21-2. bump coordinates (sheet 1 of 5) bump pad number bump pad name x (microns) x (mils) y (microns) y (mils) 1ev dd ?006.6 ?9.00 1728 68.03 2ev ss ?066.8 ?2.00 812 31.97 3v dda ?413 ?5.00 2336 91.97 4 cgmxfc ?413 ?5.00 2082 81.97 5 osc1 ?006.6 ?9.00 1474 58.03 6 osc2 ?066.8 ?2.00 50 1.97 7v ssa ?066.8 ?2.00 558 21.97 8v dd ?413 ?5.00 1474 58.03 9v ss ?066.8 ?2.00 304 11.97 10 lcdbp0 ?413 ?5.00 1728 68.03 11 lcdbp1 ?413 ?5.00 1220 48.03 12 lcdbp2 ?006.6 ?9.00 1220 48.03 13 lcdbp3 ?413 ?5.00 966 38.03 14 lcdfp1 ?413 ?5.00 712 28.03 15 lcdfp2 ?006.6 ?9.00 966 38.03 16 lcdfp3 ?413 ?5.00 458 18.03 17 lcdfp4 ?006.6 ?9.00 712 28.03 18 lcdfp5 ?413 ?5.00 204 8.03 19 lcdfp6 ?006.6 ?9.00 458 18.03 20 lcdfp7 ?413 ?5.00 ?0 ?.97 21 lcdfp8 ?006.6 ?9.00 204 8.03 22 lcdfp9 ?413 ?5.00 ?04 ?1.97 23 lcdfp10 ?006.6 ?9.00 ?0 ?.97 24 lcdfp11 ?413 ?5.00 ?58 ?1.97 25 lcdfp12 ?006.6 ?9.00 ?04 ?1.97 26 lcdfp13 ?413 ?5.00 ?12 ?1.97 27 lcdfp14 ?006.6 ?9.00 ?58 ?1.97 28 lcdfp15 ?413 ?5.00 ?066 ?1.97 29 lcdfp16 ?006.6 ?9.00 ?12 ?1.97 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mechanical data bump wafer information (mccf68hc08lk60) mc68hc(9)08lk60 rev. 1.0 advance information motorola mechanical data 345 non-disclosure agreement required 30 lcdfp17 ?413 ?5.00 ?320 ?1.97 31 lcdfp18 ?006.6 ?9.00 ?066 ?1.97 32 lcdfp19 ?413 ?5.00 ?574 ?1.97 33 lcdfp20 ?006.6 ?9.00 ?320 ?1.97 34 lcdfp21 ?413 ?5.00 ?828 ?1.97 35 lcdfp22 ?006.6 ?9.00 ?574 ?1.97 36 lcdfp23 ?413 ?5.00 ?082 ?1.97 37 lcdfp24 ?066.8 ?2.00 ?04 ?.03 38 lcdfp25 ?413 ?5.00 ?336 ?1.97 39 lcdfp26 ?006.6 ?9.00 ?828 ?1.97 40 lcdfp27 ?651 ?5.00 ?183.6 ?5.97 41 lcdfp28 ?159 ?5.00 ?590 ?01.97 42 lcdfp29 ?066.8 ?2.00 ?58 ?8.03 43 lcdfp30 ?905 ?5.00 ?590 ?01.97 44 lcdfp31 ?397 ?5.00 ?183.6 ?5.97 45 lcdfp32 ?651 ?5.00 ?590 ?01.97 46 lcdfp33 ?066.8 ?2.00 ?12 ?8.03 47 lcdfp34 ?397 ?5.00 ?590 ?01.97 48 lcdfp35 ?143 ?5.00 ?183.6 ?5.97 49 lcdfp36 ?143 ?5.00 ?590 ?01.97 50 lcdfp37 ?89 ?5.00 ?183.6 ?5.97 51 lcdfp38 ?89 ?5.00 ?590 ?01.97 52 lcdfp39 ?35 ?5.00 ?183.6 ?5.97 53 lcdfp40 ?35 ?5.00 ?590 ?01.97 54 lcdfp41 ?81 ?5.00 ?183.6 ?5.97 55 lcdfp42 ?81 ?5.00 ?590 ?01.97 56 lcdfp43 ?27 ?.00 ?183.6 ?5.97 57 v ll ?27 ?.00 ?590 ?01.97 58 vcp1 127 5.00 ?590 ?01.97 59 vcp2 127 5.00 ?183.6 ?5.97 60 vcp3 381 15.00 ?590 ?01.97 table 21-2. bump coordinates (sheet 2 of 5) bump pad number bump pad name x (microns) x (mils) y (microns) y (mils) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required mechanical data advance information mc68hc(9)08lk60 rev. 1.0 346 mechanical data motorola 61 vcp4 381 15.00 ?183.6 ?5.97 62 v ll12 635 25.00 ?590 ?01.97 63 v ll32 635 25.00 ?183.6 ?5.97 64 lcdfp44 889 35.00 ?590 ?01.97 65 lcdfp45 889 35.00 ?183.6 ?5.97 66 lcdfp46 1066.8 42.00 304 11.97 67 lcdfp47 1143 45.00 ?590 ?01.97 68 lcdfp48 1143 45.00 ?183.6 ?5.97 69 lcdfp49 1397 55.00 ?590 ?01.97 70 lcdfp50 1066.8 42.00 50 1.97 71 lcdfp51 1651 65.00 ?590 ?01.97 72 lcdfp52 1905 75.00 ?590 ?01.97 73 lcdfp53 1397 55.00 ?183.6 ?5.97 74 lcdfp54 2159 85.00 ?590 ?01.97 75 lcdfp55 1651 65.00 ?183.6 ?5.97 76 lcdfp56 1066.8 42.00 558 21.97 77 lcdfp57 1066.8 42.00 812 31.97 78 lcdfp58 2413 95.00 ?236 ?8.03 79 lcdfp59 2006.6 79.00 ?728 ?8.03 80 lcdfp60 2413 95.00 ?982 ?8.03 81 lcdfp61 2006.6 79.00 ?474 ?8.03 82 lcdfp62 2413 95.00 ?728 ?8.03 83 lcdfp63 2006.6 79.00 ?220 ?8.03 84 lcdfp64 2413 95.00 ?474 ?8.03 85 lcdfp65 2006.6 79.00 ?66 ?8.03 86 lcdfp66 2413 95.00 ?220 ?8.03 87 lcdfp67 2006.6 79.00 ?12 ?8.03 88 lcdfp68 2413 95.00 ?66 ?8.03 89 lcdfp69 2006.6 79.00 ?58 ?8.03 90 lcdfp70 2413 95.00 ?12 ?8.03 91 lcdfp71 2006.6 79.00 ?04 ?.03 table 21-2. bump coordinates (sheet 3 of 5) bump pad number bump pad name x (microns) x (mils) y (microns) y (mils) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mechanical data bump wafer information (mccf68hc08lk60) mc68hc(9)08lk60 rev. 1.0 advance information motorola mechanical data 347 non-disclosure agreement required 92 lcdfp72 2413 95.00 ?58 ?8.03 93 lcdfp73 2413 95.00 ?04 ?.03 94 lcdfp74 2006.6 79.00 50 1.97 95 lcdfp75 2413 95.00 50 1.97 96 lcdfp76 2006.6 79.00 304 11.97 97 lcdfp77 2413 95.00 304 11.97 98 lcdfp78 2006.6 79.00 558 21.97 99 lcdfp79 2413 95.00 558 21.97 100 lcdfp80 2006.6 79.00 812 31.97 101 lcdfp81 2413 95.00 812 31.97 102 lcdfp82 2006.6 79.00 1066 41.97 103 lcdfp83 2413 95.00 1066 41.97 104 lcdfp84 635 25.00 1243.8 48.97 105 lcdfp85 2413 95.00 1320 51.97 106 lcdbp4 2006.6 79.00 1320 51.97 107 lcdbp5 2413 95.00 1574 61.97 108 lcdbp6 381 15.00 1243.8 48.97 109 lcdbp7 2413 95.00 1828 71.97 110 v ss 2006.6 79.00 1574 61.97 111 v dd 2413 95.00 2082 81.97 112 alert 127 5.00 1243.8 48.97 113 ekbib 2413 95.00 2336 91.97 114 ev ss 2006.6 79.00 1828 71.97 115 ev dd 2159 85.00 2590 101.97 116 ptc0 ?27 ?.00 1243.8 48.97 117 ptc1 ?81 ?5.00 1243.8 48.97 118 ptc2 1905 75.00 2590 101.97 119 ptc3 1651 65.00 2183.6 85.97 120 ptc4 1651 65.00 2590 101.97 121 ptc5 1397 55.00 2183.6 85.97 122 ptc6 1397 55.00 2590 101.97 table 21-2. bump coordinates (sheet 4 of 5) bump pad number bump pad name x (microns) x (mils) y (microns) y (mils) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required mechanical data advance information mc68hc(9)08lk60 rev. 1.0 348 mechanical data motorola 123 ptc7 1143 45.00 2590 101.97 124 ev ss 1143 45.00 2183.6 85.97 125 ptb0 889 35.00 2183.6 85.97 126 ptb1 889 35.00 2590 101.97 127 ptb2 635 25.00 2183.6 85.97 128 ptb3 635 25.00 2590 101.97 129 ptb4 381 15.00 2183.6 85.97 130 ptb5 381 15.00 2590 101.97 131 ptb6 127 5.00 2590 101.97 132 ptb7 127 5.00 2183.6 85.97 133 pta0 ?27 ?.00 2590 101.97 134 pta1 ?27 ?.00 2183.6 85.97 135 pta2 ?81 ?5.00 2590 101.97 136 pta3 ?81 ?5.00 2183.6 85.97 137 pta4 ?35 ?5.00 2590 101.97 138 pta5 ?35 ?5.00 2183.6 85.97 139 pta6 ?89 ?5.00 2590 101.97 140 pta7 ?35 ?5.00 1243.8 48.97 141 irq2b ?143 ?5.00 2590 101.97 142 irq1b ?89 ?5.00 2183.6 85.97 143 ev ss ?89 ?5.00 1243.8 48.97 144 sck ?397 ?5.00 2590 101.97 145 mosi ?651 ?5.00 2590 101.97 146 miso ?143 ?5.00 2183.6 85.97 147 ssb ?905 ?5.00 2590 101.97 148 tdo ?397 ?5.00 2183.6 85.97 149 rdi ?651 ?5.00 2183.6 85.97 150 rstb ?159 ?5.00 2590 101.97 table 21-2. bump coordinates (sheet 5 of 5) bump pad number bump pad name x (microns) x (mils) y (microns) y (mils) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mechanical data bump wafer information (mccf68hc08lk60) mc68hc(9)08lk60 rev. 1.0 advance information motorola mechanical data 349 non-disclosure agreement required 21.5.3 die feature figure 21-3. bump die layout f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required mechanical data advance information mc68hc(9)08lk60 rev. 1.0 350 mechanical data motorola 21.5.4 tape and reel die orientation figure 21-4. tape and reel die orientation note: active side down (bumps side), x-ray top view f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc(9)08lk60 rev. 1.0 advance information motorola ordering information 351 non-disclosure agreement required advance information mc68hc(9)08lk60 section 22. ordering information 22.1 contents 22.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337 22.3 mc order numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337 22.2 introduction this section contains instructions for ordering the mc68hc(9)08lk60. 22.3 mc order numbers table 22-1. mc order numbers mc order number operating temperature range description mc68hc08lk60vf ?0 to +65 c bga package mcw68hc08lk60 ?0 to +65 c wafer sales mccf68hc08lk60 ?0 to +65 c bump wafer sales note: tested and guaranteed at room temperature only. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
non-disclosure agreement required ordering information advance information mc68hc(9)08lk60 rev. 1.0 352 ordering information motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc08lk60/d motorola, inc., 2000 motorola reserves the right to make changes without further notice to any products herein. motorola makes no warranty, representation or guarantee r egarding the suitability of its products for any particular purpose, nor does motorola assume any liability arising out of the application or use of any product or circuit, and speci cally disclaims any and all liability, including without limitation consequential or incidental damages. "typical" parameters which may be provided in motorola data sheets and/or speci ?ations can and do vary in different applications and actual performance may vary over time. all operating parameters, including "typicals" must be validated for each customer applica tion by customer's technical experts. motorola does not convey any license under its patent rights nor the rights of others. motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failu re of the motorola product could create a situation where personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized applicati on, buyer shall indemnify and hold motorola and its of?ers, employees, subsidiaries, af?iates, and distributors harmless against all claims, costs, damages, and expenses, and rea sonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that mot orola was negligent regarding the design or manufacture of the part. motorola and are registered trademarks of motorola, inc. motorola, inc. is an equal opportuni ty/af?mative action employer. how to reach us: usa/europe/locations not listed: motorola literature distribution, p.o. box 5405, denver, colorado 80217. 1-303-675-2140 or 1-800-441-2447. customer focus center, 1-800-521-6274 japan: motorola japan ltd.; sps, technical information center, 3-20-1, minami-azabu, minato-ku, tokyo 106-8573 japan. 81-3-3440-8573 asia/pacific: motorola semiconductors h.k. ltd.; silicon harbour centre, 2 dai king street, tai po industrial estate, tai po, n.t., hong kong. 852-26668334 mfax, motorola fax back system: rmfax0@email.sps.mot.com; http://sps.motorola.com/mfax/; touchtone, 1-602-244-6609; us and canada only, 1-800-774-1848 home page: http://motorola.com/sps/ mfax is a trademark of motorola, inc. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .


▲Up To Search▲   

 
Price & Availability of MC68HC908LK60

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X